{"action":"created","comment":{"url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/comments/46340362","id":46340362,"diff_hunk":"@@ -34,3 +35,38 @@ exports.reorderTeamMediaGroups = (teamId, teamMediaGroupIds, callback) ->\n   params = teamId: teamId, sortedIds: teamMediaGroupIds\n   @collections.teamMediaGroups.exec('reorderTeamMediaGroups', params)\n     .callback callback\n+\n+\n+# Share teamMediaGroup on an associated Facebook page that YOU manage\n+exports.facebookShareTeamMediaGroup = (teamMediaGroupId, facebookPageId,\n+  isSuppressedFromFeed, albumName, callback) ->\n+    # If a facebookPageId is not present, APIv3 will assume you're\n+    # posting to your personal profile.\n+    if typeof facebookPageId is 'boolean'\n+      callback = albumName\n+      albumName = isSuppressedFromFeed\n+      isSuppressedFromFeed = facebookPageId\n+      facebookPageId = null\n+    # Album Name is optional\n+    if typeof albumName is 'function'\n+      callback = albumName\n+\n+    if facebookPageId?\n+      facebookPageId = parseInt facebookPageId\n+\n+    if @isItem teamMediaGroupId, 'teamMedium'\n+      teamMediaGroupId = teamMediaGroup.id\n+\n+    unless isSuppressedFromFeed? and typeof isSuppressedFromFeed is 'boolean'\n+      throw new TSArgsError 'teamsnap.facebookShareMediaGroup', 'must include\n+      boolean isSuppressedFromFeed'\n+\n+    params = {\n+      teamMediaGroupId: teamMediaGroupId,\n+      facebookPageId: facebookPageId,\n+      albumName: albumName,\n+      isSuppressedFromFeed: isSuppressedFromFeed\n+    }","path":"src/collections/teamMediaGroups.coffee","position":43,"original_position":43,"commit_id":"3775421ccc8dbfd6c26ef4a67d7ae3dda1be2a01","original_commit_id":"3775421ccc8dbfd6c26ef4a67d7ae3dda1be2a01","user":{"login":"dmccraw","id":600860,"avatar_url":"https://avatars.githubusercontent.com/u/600860?v=3","gravatar_id":"","url":"https://api.github.com/users/dmccraw","html_url":"https://github.com/dmccraw","followers_url":"https://api.github.com/users/dmccraw/followers","following_url":"https://api.github.com/users/dmccraw/following{/other_user}","gists_url":"https://api.github.com/users/dmccraw/gists{/gist_id}","starred_url":"https://api.github.com/users/dmccraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmccraw/subscriptions","organizations_url":"https://api.github.com/users/dmccraw/orgs","repos_url":"https://api.github.com/users/dmccraw/repos","events_url":"https://api.github.com/users/dmccraw/events{/privacy}","received_events_url":"https://api.github.com/users/dmccraw/received_events","type":"User","site_admin":false},"body":"@matthopson As we make more and more values optional when do we need to start having more documentation on each of the functions?","created_at":"2015-12-01T21:19:07Z","updated_at":"2015-12-01T21:19:07Z","html_url":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86#discussion_r46340362","pull_request_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/comments/46340362"},"html":{"href":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86#discussion_r46340362"},"pull_request":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86","id":52314594,"html_url":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86","diff_url":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86.diff","patch_url":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86.patch","issue_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/86","number":86,"state":"open","locked":false,"title":"Media facebook sharing","user":{"login":"matthopson","id":1891789,"avatar_url":"https://avatars.githubusercontent.com/u/1891789?v=3","gravatar_id":"","url":"https://api.github.com/users/matthopson","html_url":"https://github.com/matthopson","followers_url":"https://api.github.com/users/matthopson/followers","following_url":"https://api.github.com/users/matthopson/following{/other_user}","gists_url":"https://api.github.com/users/matthopson/gists{/gist_id}","starred_url":"https://api.github.com/users/matthopson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthopson/subscriptions","organizations_url":"https://api.github.com/users/matthopson/orgs","repos_url":"https://api.github.com/users/matthopson/repos","events_url":"https://api.github.com/users/matthopson/events{/privacy}","received_events_url":"https://api.github.com/users/matthopson/received_events","type":"User","site_admin":false},"body":"Adds support for `facebook_share_team_medium` and `facebook_share_team_media_group`","created_at":"2015-12-01T20:57:18Z","updated_at":"2015-12-01T21:19:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfdb5409e895d50a4bb8786cd66b8e116e5a536f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86/commits","review_comments_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86/comments","review_comment_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/86/comments","statuses_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/statuses/3775421ccc8dbfd6c26ef4a67d7ae3dda1be2a01","head":{"label":"teamsnap:media-facebook-sharing","ref":"media-facebook-sharing","sha":"3775421ccc8dbfd6c26ef4a67d7ae3dda1be2a01","user":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=3","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"repo":{"id":20901458,"name":"teamsnap-javascript-sdk","full_name":"teamsnap/teamsnap-javascript-sdk","owner":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=3","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamsnap/teamsnap-javascript-sdk","description":"Javascript SDK for TeamSnap's APIv3","fork":false,"url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk","forks_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/forks","keys_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/teams","hooks_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/events","assignees_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/tags","blobs_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/subscription","commits_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/merges","archive_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/downloads","issues_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/releases{/id}","created_at":"2014-06-16T21:28:29Z","updated_at":"2015-11-06T19:41:02Z","pushed_at":"2015-12-01T21:01:28Z","git_url":"git://github.com/teamsnap/teamsnap-javascript-sdk.git","ssh_url":"git@github.com:teamsnap/teamsnap-javascript-sdk.git","clone_url":"https://github.com/teamsnap/teamsnap-javascript-sdk.git","svn_url":"https://github.com/teamsnap/teamsnap-javascript-sdk","homepage":null,"size":1000,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"teamsnap:pre-1.7.0","ref":"pre-1.7.0","sha":"f1ba4e22935c2be0a8db80bf3f16f3b512bb1155","user":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=3","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"repo":{"id":20901458,"name":"teamsnap-javascript-sdk","full_name":"teamsnap/teamsnap-javascript-sdk","owner":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=3","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamsnap/teamsnap-javascript-sdk","description":"Javascript SDK for TeamSnap's APIv3","fork":false,"url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk","forks_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/forks","keys_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/teams","hooks_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/events","assignees_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/tags","blobs_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/subscription","commits_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/merges","archive_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/downloads","issues_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/releases{/id}","created_at":"2014-06-16T21:28:29Z","updated_at":"2015-11-06T19:41:02Z","pushed_at":"2015-12-01T21:01:28Z","git_url":"git://github.com/teamsnap/teamsnap-javascript-sdk.git","ssh_url":"git@github.com:teamsnap/teamsnap-javascript-sdk.git","clone_url":"https://github.com/teamsnap/teamsnap-javascript-sdk.git","svn_url":"https://github.com/teamsnap/teamsnap-javascript-sdk","homepage":null,"size":1000,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86"},"html":{"href":"https://github.com/teamsnap/teamsnap-javascript-sdk/pull/86"},"issue":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/86"},"comments":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/teamsnap/teamsnap-javascript-sdk/statuses/3775421ccc8dbfd6c26ef4a67d7ae3dda1be2a01"}}}}