{"action":"created","comment":{"url":"https://api.github.com/repos/anyTV/cli-applications/pulls/comments/40190634","id":40190634,"diff_hunk":"@@ -0,0 +1,200 @@\n+'use strict';\n+\n+var mysql = require('anytv-node-mysql'),\n+    cudl = require('cuddle'),\n+    moment = require('moment'),\n+    async = require('async'),\n+    _ = require('lodash'),\n+    app = {};\n+\n+require('moment-range');\n+\n+module.exports = function(next) {\n+\n+\n+    var app = this,\n+        mcn_token,\n+        review_channels,\n+        sponsorship_videos = [],\n+        network_map = {},\n+        limit = 20,\n+        offset = 0,\n+        success = 0,\n+        failed = 0,\n+        ctr = 0,\n+        ctr_channel = 0,\n+        videos_count = 0;\n+\n+    function start() {\n+        return authenticate();","path":"commands/sponsorship_playlist.js","position":29,"original_position":29,"commit_id":"8d3dd729ab8757ef8df3139ab730660ef27bc401","original_commit_id":"8d3dd729ab8757ef8df3139ab730660ef27bc401","user":{"login":"eshleebien","id":4904268,"avatar_url":"https://avatars.githubusercontent.com/u/4904268?v=3","gravatar_id":"","url":"https://api.github.com/users/eshleebien","html_url":"https://github.com/eshleebien","followers_url":"https://api.github.com/users/eshleebien/followers","following_url":"https://api.github.com/users/eshleebien/following{/other_user}","gists_url":"https://api.github.com/users/eshleebien/gists{/gist_id}","starred_url":"https://api.github.com/users/eshleebien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eshleebien/subscriptions","organizations_url":"https://api.github.com/users/eshleebien/orgs","repos_url":"https://api.github.com/users/eshleebien/repos","events_url":"https://api.github.com/users/eshleebien/events{/privacy}","received_events_url":"https://api.github.com/users/eshleebien/received_events","type":"User","site_admin":false},"body":"i suggest add log info here that the script started. for logging purpose :)","created_at":"2015-09-23T10:54:36Z","updated_at":"2015-09-23T10:54:36Z","html_url":"https://github.com/anyTV/cli-applications/pull/12#discussion_r40190634","pull_request_url":"https://api.github.com/repos/anyTV/cli-applications/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/comments/40190634"},"html":{"href":"https://github.com/anyTV/cli-applications/pull/12#discussion_r40190634"},"pull_request":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/anyTV/cli-applications/pulls/12","id":45765558,"html_url":"https://github.com/anyTV/cli-applications/pull/12","diff_url":"https://github.com/anyTV/cli-applications/pull/12.diff","patch_url":"https://github.com/anyTV/cli-applications/pull/12.patch","issue_url":"https://api.github.com/repos/anyTV/cli-applications/issues/12","number":12,"state":"open","locked":false,"title":"Update youtube playlist","user":{"login":"rycastaneda","id":4694510,"avatar_url":"https://avatars.githubusercontent.com/u/4694510?v=3","gravatar_id":"","url":"https://api.github.com/users/rycastaneda","html_url":"https://github.com/rycastaneda","followers_url":"https://api.github.com/users/rycastaneda/followers","following_url":"https://api.github.com/users/rycastaneda/following{/other_user}","gists_url":"https://api.github.com/users/rycastaneda/gists{/gist_id}","starred_url":"https://api.github.com/users/rycastaneda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rycastaneda/subscriptions","organizations_url":"https://api.github.com/users/rycastaneda/orgs","repos_url":"https://api.github.com/users/rycastaneda/repos","events_url":"https://api.github.com/users/rycastaneda/events{/privacy}","received_events_url":"https://api.github.com/users/rycastaneda/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-23T10:52:12Z","updated_at":"2015-09-23T10:54:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"530aea319e9d508eb108da56db240d8ae301c304","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/anyTV/cli-applications/pulls/12/commits","review_comments_url":"https://api.github.com/repos/anyTV/cli-applications/pulls/12/comments","review_comment_url":"https://api.github.com/repos/anyTV/cli-applications/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anyTV/cli-applications/issues/12/comments","statuses_url":"https://api.github.com/repos/anyTV/cli-applications/statuses/8d3dd729ab8757ef8df3139ab730660ef27bc401","head":{"label":"anyTV:update_youtube_playlist","ref":"update_youtube_playlist","sha":"8d3dd729ab8757ef8df3139ab730660ef27bc401","user":{"login":"anyTV","id":3164673,"avatar_url":"https://avatars.githubusercontent.com/u/3164673?v=3","gravatar_id":"","url":"https://api.github.com/users/anyTV","html_url":"https://github.com/anyTV","followers_url":"https://api.github.com/users/anyTV/followers","following_url":"https://api.github.com/users/anyTV/following{/other_user}","gists_url":"https://api.github.com/users/anyTV/gists{/gist_id}","starred_url":"https://api.github.com/users/anyTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anyTV/subscriptions","organizations_url":"https://api.github.com/users/anyTV/orgs","repos_url":"https://api.github.com/users/anyTV/repos","events_url":"https://api.github.com/users/anyTV/events{/privacy}","received_events_url":"https://api.github.com/users/anyTV/received_events","type":"Organization","site_admin":false},"repo":{"id":33480849,"name":"cli-applications","full_name":"anyTV/cli-applications","owner":{"login":"anyTV","id":3164673,"avatar_url":"https://avatars.githubusercontent.com/u/3164673?v=3","gravatar_id":"","url":"https://api.github.com/users/anyTV","html_url":"https://github.com/anyTV","followers_url":"https://api.github.com/users/anyTV/followers","following_url":"https://api.github.com/users/anyTV/following{/other_user}","gists_url":"https://api.github.com/users/anyTV/gists{/gist_id}","starred_url":"https://api.github.com/users/anyTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anyTV/subscriptions","organizations_url":"https://api.github.com/users/anyTV/orgs","repos_url":"https://api.github.com/users/anyTV/repos","events_url":"https://api.github.com/users/anyTV/events{/privacy}","received_events_url":"https://api.github.com/users/anyTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/anyTV/cli-applications","description":"Sync channels table etc","fork":false,"url":"https://api.github.com/repos/anyTV/cli-applications","forks_url":"https://api.github.com/repos/anyTV/cli-applications/forks","keys_url":"https://api.github.com/repos/anyTV/cli-applications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anyTV/cli-applications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anyTV/cli-applications/teams","hooks_url":"https://api.github.com/repos/anyTV/cli-applications/hooks","issue_events_url":"https://api.github.com/repos/anyTV/cli-applications/issues/events{/number}","events_url":"https://api.github.com/repos/anyTV/cli-applications/events","assignees_url":"https://api.github.com/repos/anyTV/cli-applications/assignees{/user}","branches_url":"https://api.github.com/repos/anyTV/cli-applications/branches{/branch}","tags_url":"https://api.github.com/repos/anyTV/cli-applications/tags","blobs_url":"https://api.github.com/repos/anyTV/cli-applications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anyTV/cli-applications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anyTV/cli-applications/git/refs{/sha}","trees_url":"https://api.github.com/repos/anyTV/cli-applications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anyTV/cli-applications/statuses/{sha}","languages_url":"https://api.github.com/repos/anyTV/cli-applications/languages","stargazers_url":"https://api.github.com/repos/anyTV/cli-applications/stargazers","contributors_url":"https://api.github.com/repos/anyTV/cli-applications/contributors","subscribers_url":"https://api.github.com/repos/anyTV/cli-applications/subscribers","subscription_url":"https://api.github.com/repos/anyTV/cli-applications/subscription","commits_url":"https://api.github.com/repos/anyTV/cli-applications/commits{/sha}","git_commits_url":"https://api.github.com/repos/anyTV/cli-applications/git/commits{/sha}","comments_url":"https://api.github.com/repos/anyTV/cli-applications/comments{/number}","issue_comment_url":"https://api.github.com/repos/anyTV/cli-applications/issues/comments{/number}","contents_url":"https://api.github.com/repos/anyTV/cli-applications/contents/{+path}","compare_url":"https://api.github.com/repos/anyTV/cli-applications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anyTV/cli-applications/merges","archive_url":"https://api.github.com/repos/anyTV/cli-applications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anyTV/cli-applications/downloads","issues_url":"https://api.github.com/repos/anyTV/cli-applications/issues{/number}","pulls_url":"https://api.github.com/repos/anyTV/cli-applications/pulls{/number}","milestones_url":"https://api.github.com/repos/anyTV/cli-applications/milestones{/number}","notifications_url":"https://api.github.com/repos/anyTV/cli-applications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anyTV/cli-applications/labels{/name}","releases_url":"https://api.github.com/repos/anyTV/cli-applications/releases{/id}","created_at":"2015-04-06T12:28:07Z","updated_at":"2015-05-14T03:02:48Z","pushed_at":"2015-09-23T10:52:13Z","git_url":"git://github.com/anyTV/cli-applications.git","ssh_url":"git@github.com:anyTV/cli-applications.git","clone_url":"https://github.com/anyTV/cli-applications.git","svn_url":"https://github.com/anyTV/cli-applications","homepage":null,"size":356,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"anyTV:master","ref":"master","sha":"5748fd4a8b430c8e9d73f8fc18f59e71f231f9e3","user":{"login":"anyTV","id":3164673,"avatar_url":"https://avatars.githubusercontent.com/u/3164673?v=3","gravatar_id":"","url":"https://api.github.com/users/anyTV","html_url":"https://github.com/anyTV","followers_url":"https://api.github.com/users/anyTV/followers","following_url":"https://api.github.com/users/anyTV/following{/other_user}","gists_url":"https://api.github.com/users/anyTV/gists{/gist_id}","starred_url":"https://api.github.com/users/anyTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anyTV/subscriptions","organizations_url":"https://api.github.com/users/anyTV/orgs","repos_url":"https://api.github.com/users/anyTV/repos","events_url":"https://api.github.com/users/anyTV/events{/privacy}","received_events_url":"https://api.github.com/users/anyTV/received_events","type":"Organization","site_admin":false},"repo":{"id":33480849,"name":"cli-applications","full_name":"anyTV/cli-applications","owner":{"login":"anyTV","id":3164673,"avatar_url":"https://avatars.githubusercontent.com/u/3164673?v=3","gravatar_id":"","url":"https://api.github.com/users/anyTV","html_url":"https://github.com/anyTV","followers_url":"https://api.github.com/users/anyTV/followers","following_url":"https://api.github.com/users/anyTV/following{/other_user}","gists_url":"https://api.github.com/users/anyTV/gists{/gist_id}","starred_url":"https://api.github.com/users/anyTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anyTV/subscriptions","organizations_url":"https://api.github.com/users/anyTV/orgs","repos_url":"https://api.github.com/users/anyTV/repos","events_url":"https://api.github.com/users/anyTV/events{/privacy}","received_events_url":"https://api.github.com/users/anyTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/anyTV/cli-applications","description":"Sync channels table etc","fork":false,"url":"https://api.github.com/repos/anyTV/cli-applications","forks_url":"https://api.github.com/repos/anyTV/cli-applications/forks","keys_url":"https://api.github.com/repos/anyTV/cli-applications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anyTV/cli-applications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anyTV/cli-applications/teams","hooks_url":"https://api.github.com/repos/anyTV/cli-applications/hooks","issue_events_url":"https://api.github.com/repos/anyTV/cli-applications/issues/events{/number}","events_url":"https://api.github.com/repos/anyTV/cli-applications/events","assignees_url":"https://api.github.com/repos/anyTV/cli-applications/assignees{/user}","branches_url":"https://api.github.com/repos/anyTV/cli-applications/branches{/branch}","tags_url":"https://api.github.com/repos/anyTV/cli-applications/tags","blobs_url":"https://api.github.com/repos/anyTV/cli-applications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anyTV/cli-applications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anyTV/cli-applications/git/refs{/sha}","trees_url":"https://api.github.com/repos/anyTV/cli-applications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anyTV/cli-applications/statuses/{sha}","languages_url":"https://api.github.com/repos/anyTV/cli-applications/languages","stargazers_url":"https://api.github.com/repos/anyTV/cli-applications/stargazers","contributors_url":"https://api.github.com/repos/anyTV/cli-applications/contributors","subscribers_url":"https://api.github.com/repos/anyTV/cli-applications/subscribers","subscription_url":"https://api.github.com/repos/anyTV/cli-applications/subscription","commits_url":"https://api.github.com/repos/anyTV/cli-applications/commits{/sha}","git_commits_url":"https://api.github.com/repos/anyTV/cli-applications/git/commits{/sha}","comments_url":"https://api.github.com/repos/anyTV/cli-applications/comments{/number}","issue_comment_url":"https://api.github.com/repos/anyTV/cli-applications/issues/comments{/number}","contents_url":"https://api.github.com/repos/anyTV/cli-applications/contents/{+path}","compare_url":"https://api.github.com/repos/anyTV/cli-applications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anyTV/cli-applications/merges","archive_url":"https://api.github.com/repos/anyTV/cli-applications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anyTV/cli-applications/downloads","issues_url":"https://api.github.com/repos/anyTV/cli-applications/issues{/number}","pulls_url":"https://api.github.com/repos/anyTV/cli-applications/pulls{/number}","milestones_url":"https://api.github.com/repos/anyTV/cli-applications/milestones{/number}","notifications_url":"https://api.github.com/repos/anyTV/cli-applications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anyTV/cli-applications/labels{/name}","releases_url":"https://api.github.com/repos/anyTV/cli-applications/releases{/id}","created_at":"2015-04-06T12:28:07Z","updated_at":"2015-05-14T03:02:48Z","pushed_at":"2015-09-23T10:52:13Z","git_url":"git://github.com/anyTV/cli-applications.git","ssh_url":"git@github.com:anyTV/cli-applications.git","clone_url":"https://github.com/anyTV/cli-applications.git","svn_url":"https://github.com/anyTV/cli-applications","homepage":null,"size":356,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/12"},"html":{"href":"https://github.com/anyTV/cli-applications/pull/12"},"issue":{"href":"https://api.github.com/repos/anyTV/cli-applications/issues/12"},"comments":{"href":"https://api.github.com/repos/anyTV/cli-applications/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anyTV/cli-applications/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/anyTV/cli-applications/statuses/8d3dd729ab8757ef8df3139ab730660ef27bc401"}}}}