{"action":"created","comment":{"url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/comments/34043519","id":34043519,"diff_hunk":"@@ -60,13 +66,65 @@ $(document).ready(function(){\n \n \t\t\t// So that no person is selected more than once\n \t\t\ttwitterUsersArr.splice(rand, 1);\n-\n-\t\t\tconsole.log(twitterUsersArr.length);\n \t\t}\n \n \t\treturn gamePeople;\n \t}\n \n \n+\t/**\n+\t* This method creates the \"correct\"  and \"incorrect\" objects containing array of User-Tweet objects for the game. \n+\t* This method creates an object of a particular JSON structure (see ExampleData.json for structure).\n+\t* \n+\t* @returns gameObj : Object containing the 'correct' and the 'incorrect'\n+\t*/\n+\tfunction CreateUserTweetGameObject(){\n+\n+\t\t// Get List of People(handle, screenname) Objects \n+\t\tvar gamePeople = GetRandomGamePeople(people, 10);\n+\n+\t\t// Declare main Game Object\n+\t\tvar gameObj = {};\n+\t\tgameObj['correct'] = {};\n+\t\tgameObj['incorrect'] = {};\n+\n+\t\t// Objects for each Person\n+\t\tvar userObj = {};\n+\t\tvar tweetObj = {};\n+\n+\t\tgamePeople.forEach(function(person){\n+\n+\t\t\t// Get a random tweet for the person\n+\t\t\t// Substring Method is used to remove the '@' before the handle\n+\t\t\tvar tweet = GetTweet(person['handle'].substring(1));\n+\n+\t\t\t// Fill in User Object Details\n+\t\t\tuserObj['name'] = tweet['user']['name'];\n+\t\t\tuserObj['handle'] = '@' + tweet['user']['screen_name'];\n+\t\t\tuserObj['profilePicURL'] = tweet['user']['profile_img_url'];\n+\t\t\tuserObj['followURL'] = \"https://twitter.com/intent/follow?screen_name=\" + userObj['handle'];\n+\n+\t\t\tgameObj['correct'][tweet['user']['name']] = {};\n+\t\t\tgameObj['correct'][tweet['user']['name']]['userInfo'] = userObj;\n+\n+\n+\t\t\t// Fill in Tweet Object Details\n+\t\t\ttweetObj['tweetID'] = tweet['id'];\n+\t\t\ttweetObj['tweetDate'] = tweet['created_at'];\n+\t\t\ttweetObj['tweetHTML'] = // TODO --> Add a function that takes in tweet and then create the HTML tweet text for return.\n+\t\t\ttweetObj['tweetText'] = tweet['text'];\n+\t\t\ttweetObj['numOfRetweets'] = tweet['retweet_count'];\n+\t\t\ttweetObj['numOfFavorites'] = tweet['favorite_count'];\n+\n+\t\t\t// TODO --> Add tweet object to the Game Object\n+\n+\t\t});\n+\n+\t\t// TODO --> create shuffled incorrect object ","path":"js/twitterApi.js","position":84,"original_position":84,"commit_id":"42a3d8beb3283228592b1c0ce5fec5738f545718","original_commit_id":"42a3d8beb3283228592b1c0ce5fec5738f545718","user":{"login":"sukritchhabra","id":6703126,"avatar_url":"https://avatars.githubusercontent.com/u/6703126?v=3","gravatar_id":"","url":"https://api.github.com/users/sukritchhabra","html_url":"https://github.com/sukritchhabra","followers_url":"https://api.github.com/users/sukritchhabra/followers","following_url":"https://api.github.com/users/sukritchhabra/following{/other_user}","gists_url":"https://api.github.com/users/sukritchhabra/gists{/gist_id}","starred_url":"https://api.github.com/users/sukritchhabra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sukritchhabra/subscriptions","organizations_url":"https://api.github.com/users/sukritchhabra/orgs","repos_url":"https://api.github.com/users/sukritchhabra/repos","events_url":"https://api.github.com/users/sukritchhabra/events{/privacy}","received_events_url":"https://api.github.com/users/sukritchhabra/received_events","type":"User","site_admin":false},"body":"TODO's should also be added to either comments in the pull reequest or an issue or both","created_at":"2015-07-07T14:12:56Z","updated_at":"2015-07-07T14:12:56Z","html_url":"https://github.com/MidnightJabber/twitterGame/pull/7#discussion_r34043519","pull_request_url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/comments/34043519"},"html":{"href":"https://github.com/MidnightJabber/twitterGame/pull/7#discussion_r34043519"},"pull_request":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7","id":39341784,"html_url":"https://github.com/MidnightJabber/twitterGame/pull/7","diff_url":"https://github.com/MidnightJabber/twitterGame/pull/7.diff","patch_url":"https://github.com/MidnightJabber/twitterGame/pull/7.patch","issue_url":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/7","number":7,"state":"open","locked":false,"title":"Created Method that spawns a Game Object","user":{"login":"vreddi","id":6148930,"avatar_url":"https://avatars.githubusercontent.com/u/6148930?v=3","gravatar_id":"","url":"https://api.github.com/users/vreddi","html_url":"https://github.com/vreddi","followers_url":"https://api.github.com/users/vreddi/followers","following_url":"https://api.github.com/users/vreddi/following{/other_user}","gists_url":"https://api.github.com/users/vreddi/gists{/gist_id}","starred_url":"https://api.github.com/users/vreddi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vreddi/subscriptions","organizations_url":"https://api.github.com/users/vreddi/orgs","repos_url":"https://api.github.com/users/vreddi/repos","events_url":"https://api.github.com/users/vreddi/events{/privacy}","received_events_url":"https://api.github.com/users/vreddi/received_events","type":"User","site_admin":false},"body":"* Still a bunch of TODO left in the method\r\n\r\n* Removed tweet_json.php from root directory. The file should be in the\r\nphp directory","created_at":"2015-07-07T07:25:53Z","updated_at":"2015-07-07T14:12:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97c3ed777cba939d3c66fc19f7074698d86c6927","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7/commits","review_comments_url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7/comments","review_comment_url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/7/comments","statuses_url":"https://api.github.com/repos/MidnightJabber/twitterGame/statuses/42a3d8beb3283228592b1c0ce5fec5738f545718","head":{"label":"vreddi:TwitterAPI","ref":"TwitterAPI","sha":"42a3d8beb3283228592b1c0ce5fec5738f545718","user":{"login":"vreddi","id":6148930,"avatar_url":"https://avatars.githubusercontent.com/u/6148930?v=3","gravatar_id":"","url":"https://api.github.com/users/vreddi","html_url":"https://github.com/vreddi","followers_url":"https://api.github.com/users/vreddi/followers","following_url":"https://api.github.com/users/vreddi/following{/other_user}","gists_url":"https://api.github.com/users/vreddi/gists{/gist_id}","starred_url":"https://api.github.com/users/vreddi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vreddi/subscriptions","organizations_url":"https://api.github.com/users/vreddi/orgs","repos_url":"https://api.github.com/users/vreddi/repos","events_url":"https://api.github.com/users/vreddi/events{/privacy}","received_events_url":"https://api.github.com/users/vreddi/received_events","type":"User","site_admin":false},"repo":{"id":38557214,"name":"twitterGame","full_name":"vreddi/twitterGame","owner":{"login":"vreddi","id":6148930,"avatar_url":"https://avatars.githubusercontent.com/u/6148930?v=3","gravatar_id":"","url":"https://api.github.com/users/vreddi","html_url":"https://github.com/vreddi","followers_url":"https://api.github.com/users/vreddi/followers","following_url":"https://api.github.com/users/vreddi/following{/other_user}","gists_url":"https://api.github.com/users/vreddi/gists{/gist_id}","starred_url":"https://api.github.com/users/vreddi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vreddi/subscriptions","organizations_url":"https://api.github.com/users/vreddi/orgs","repos_url":"https://api.github.com/users/vreddi/repos","events_url":"https://api.github.com/users/vreddi/events{/privacy}","received_events_url":"https://api.github.com/users/vreddi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vreddi/twitterGame","description":"","fork":true,"url":"https://api.github.com/repos/vreddi/twitterGame","forks_url":"https://api.github.com/repos/vreddi/twitterGame/forks","keys_url":"https://api.github.com/repos/vreddi/twitterGame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vreddi/twitterGame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vreddi/twitterGame/teams","hooks_url":"https://api.github.com/repos/vreddi/twitterGame/hooks","issue_events_url":"https://api.github.com/repos/vreddi/twitterGame/issues/events{/number}","events_url":"https://api.github.com/repos/vreddi/twitterGame/events","assignees_url":"https://api.github.com/repos/vreddi/twitterGame/assignees{/user}","branches_url":"https://api.github.com/repos/vreddi/twitterGame/branches{/branch}","tags_url":"https://api.github.com/repos/vreddi/twitterGame/tags","blobs_url":"https://api.github.com/repos/vreddi/twitterGame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vreddi/twitterGame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vreddi/twitterGame/git/refs{/sha}","trees_url":"https://api.github.com/repos/vreddi/twitterGame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vreddi/twitterGame/statuses/{sha}","languages_url":"https://api.github.com/repos/vreddi/twitterGame/languages","stargazers_url":"https://api.github.com/repos/vreddi/twitterGame/stargazers","contributors_url":"https://api.github.com/repos/vreddi/twitterGame/contributors","subscribers_url":"https://api.github.com/repos/vreddi/twitterGame/subscribers","subscription_url":"https://api.github.com/repos/vreddi/twitterGame/subscription","commits_url":"https://api.github.com/repos/vreddi/twitterGame/commits{/sha}","git_commits_url":"https://api.github.com/repos/vreddi/twitterGame/git/commits{/sha}","comments_url":"https://api.github.com/repos/vreddi/twitterGame/comments{/number}","issue_comment_url":"https://api.github.com/repos/vreddi/twitterGame/issues/comments{/number}","contents_url":"https://api.github.com/repos/vreddi/twitterGame/contents/{+path}","compare_url":"https://api.github.com/repos/vreddi/twitterGame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vreddi/twitterGame/merges","archive_url":"https://api.github.com/repos/vreddi/twitterGame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vreddi/twitterGame/downloads","issues_url":"https://api.github.com/repos/vreddi/twitterGame/issues{/number}","pulls_url":"https://api.github.com/repos/vreddi/twitterGame/pulls{/number}","milestones_url":"https://api.github.com/repos/vreddi/twitterGame/milestones{/number}","notifications_url":"https://api.github.com/repos/vreddi/twitterGame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vreddi/twitterGame/labels{/name}","releases_url":"https://api.github.com/repos/vreddi/twitterGame/releases{/id}","created_at":"2015-07-05T04:53:26Z","updated_at":"2015-07-05T05:04:05Z","pushed_at":"2015-07-07T07:23:20Z","git_url":"git://github.com/vreddi/twitterGame.git","ssh_url":"git@github.com:vreddi/twitterGame.git","clone_url":"https://github.com/vreddi/twitterGame.git","svn_url":"https://github.com/vreddi/twitterGame","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"MidnightJabber:master","ref":"master","sha":"c1ce9b51ea7dc28489de75bf402bf283ea42b30e","user":{"login":"MidnightJabber","id":8540859,"avatar_url":"https://avatars.githubusercontent.com/u/8540859?v=3","gravatar_id":"","url":"https://api.github.com/users/MidnightJabber","html_url":"https://github.com/MidnightJabber","followers_url":"https://api.github.com/users/MidnightJabber/followers","following_url":"https://api.github.com/users/MidnightJabber/following{/other_user}","gists_url":"https://api.github.com/users/MidnightJabber/gists{/gist_id}","starred_url":"https://api.github.com/users/MidnightJabber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MidnightJabber/subscriptions","organizations_url":"https://api.github.com/users/MidnightJabber/orgs","repos_url":"https://api.github.com/users/MidnightJabber/repos","events_url":"https://api.github.com/users/MidnightJabber/events{/privacy}","received_events_url":"https://api.github.com/users/MidnightJabber/received_events","type":"Organization","site_admin":false},"repo":{"id":38521612,"name":"twitterGame","full_name":"MidnightJabber/twitterGame","owner":{"login":"MidnightJabber","id":8540859,"avatar_url":"https://avatars.githubusercontent.com/u/8540859?v=3","gravatar_id":"","url":"https://api.github.com/users/MidnightJabber","html_url":"https://github.com/MidnightJabber","followers_url":"https://api.github.com/users/MidnightJabber/followers","following_url":"https://api.github.com/users/MidnightJabber/following{/other_user}","gists_url":"https://api.github.com/users/MidnightJabber/gists{/gist_id}","starred_url":"https://api.github.com/users/MidnightJabber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MidnightJabber/subscriptions","organizations_url":"https://api.github.com/users/MidnightJabber/orgs","repos_url":"https://api.github.com/users/MidnightJabber/repos","events_url":"https://api.github.com/users/MidnightJabber/events{/privacy}","received_events_url":"https://api.github.com/users/MidnightJabber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MidnightJabber/twitterGame","description":"","fork":false,"url":"https://api.github.com/repos/MidnightJabber/twitterGame","forks_url":"https://api.github.com/repos/MidnightJabber/twitterGame/forks","keys_url":"https://api.github.com/repos/MidnightJabber/twitterGame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MidnightJabber/twitterGame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MidnightJabber/twitterGame/teams","hooks_url":"https://api.github.com/repos/MidnightJabber/twitterGame/hooks","issue_events_url":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/events{/number}","events_url":"https://api.github.com/repos/MidnightJabber/twitterGame/events","assignees_url":"https://api.github.com/repos/MidnightJabber/twitterGame/assignees{/user}","branches_url":"https://api.github.com/repos/MidnightJabber/twitterGame/branches{/branch}","tags_url":"https://api.github.com/repos/MidnightJabber/twitterGame/tags","blobs_url":"https://api.github.com/repos/MidnightJabber/twitterGame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MidnightJabber/twitterGame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MidnightJabber/twitterGame/git/refs{/sha}","trees_url":"https://api.github.com/repos/MidnightJabber/twitterGame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MidnightJabber/twitterGame/statuses/{sha}","languages_url":"https://api.github.com/repos/MidnightJabber/twitterGame/languages","stargazers_url":"https://api.github.com/repos/MidnightJabber/twitterGame/stargazers","contributors_url":"https://api.github.com/repos/MidnightJabber/twitterGame/contributors","subscribers_url":"https://api.github.com/repos/MidnightJabber/twitterGame/subscribers","subscription_url":"https://api.github.com/repos/MidnightJabber/twitterGame/subscription","commits_url":"https://api.github.com/repos/MidnightJabber/twitterGame/commits{/sha}","git_commits_url":"https://api.github.com/repos/MidnightJabber/twitterGame/git/commits{/sha}","comments_url":"https://api.github.com/repos/MidnightJabber/twitterGame/comments{/number}","issue_comment_url":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/comments{/number}","contents_url":"https://api.github.com/repos/MidnightJabber/twitterGame/contents/{+path}","compare_url":"https://api.github.com/repos/MidnightJabber/twitterGame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MidnightJabber/twitterGame/merges","archive_url":"https://api.github.com/repos/MidnightJabber/twitterGame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MidnightJabber/twitterGame/downloads","issues_url":"https://api.github.com/repos/MidnightJabber/twitterGame/issues{/number}","pulls_url":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls{/number}","milestones_url":"https://api.github.com/repos/MidnightJabber/twitterGame/milestones{/number}","notifications_url":"https://api.github.com/repos/MidnightJabber/twitterGame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MidnightJabber/twitterGame/labels{/name}","releases_url":"https://api.github.com/repos/MidnightJabber/twitterGame/releases{/id}","created_at":"2015-07-04T04:32:48Z","updated_at":"2015-07-06T14:07:57Z","pushed_at":"2015-07-07T07:25:53Z","git_url":"git://github.com/MidnightJabber/twitterGame.git","ssh_url":"git@github.com:MidnightJabber/twitterGame.git","clone_url":"https://github.com/MidnightJabber/twitterGame.git","svn_url":"https://github.com/MidnightJabber/twitterGame","homepage":null,"size":0,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7"},"html":{"href":"https://github.com/MidnightJabber/twitterGame/pull/7"},"issue":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/7"},"comments":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/MidnightJabber/twitterGame/statuses/42a3d8beb3283228592b1c0ce5fec5738f545718"}}}}