{"action":"created","comment":{"url":"https://api.github.com/repos/twilio/twilio-java/pulls/comments/51175821","id":51175821,"diff_hunk":"@@ -98,6 +101,36 @@ public TaskQueueStatistics(final TwilioTaskRouterClient client, final String wor\n \t}\n \n \t/**\n+\t * Get the number of tasks with the Priority\n+\t * @return number of tasks with Priority priority\n+\t */\n+\tpublic Integer getTasksWithPriority(int priority) {\n+\t\tMap<String, Object> tasksByPriority = (Map<String, Object>) getRealtime().get(TASKS_BY_PRIORITY_PROPERTY);\n+\n+\t\tString tasksByPriorityKey = \"Priority-\" + String.valueOf(priority);","path":"src/main/java/com/twilio/sdk/resource/instance/taskrouter/TaskQueueStatistics.java","position":27,"original_position":27,"commit_id":"47f7027758280db8f016a509d222c6d47d43161a","original_commit_id":"47f7027758280db8f016a509d222c6d47d43161a","user":{"login":"jingming","id":1530951,"avatar_url":"https://avatars.githubusercontent.com/u/1530951?v=3","gravatar_id":"","url":"https://api.github.com/users/jingming","html_url":"https://github.com/jingming","followers_url":"https://api.github.com/users/jingming/followers","following_url":"https://api.github.com/users/jingming/following{/other_user}","gists_url":"https://api.github.com/users/jingming/gists{/gist_id}","starred_url":"https://api.github.com/users/jingming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingming/subscriptions","organizations_url":"https://api.github.com/users/jingming/orgs","repos_url":"https://api.github.com/users/jingming/repos","events_url":"https://api.github.com/users/jingming/events{/privacy}","received_events_url":"https://api.github.com/users/jingming/received_events","type":"User","site_admin":false},"body":"this can be `String tasksByPriorityKey = \"Priority-\" + priority;`","created_at":"2016-01-28T19:41:51Z","updated_at":"2016-01-28T19:41:51Z","html_url":"https://github.com/twilio/twilio-java/pull/245#discussion_r51175821","pull_request_url":"https://api.github.com/repos/twilio/twilio-java/pulls/245","_links":{"self":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/comments/51175821"},"html":{"href":"https://github.com/twilio/twilio-java/pull/245#discussion_r51175821"},"pull_request":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/245"}}},"pull_request":{"url":"https://api.github.com/repos/twilio/twilio-java/pulls/245","id":57314213,"html_url":"https://github.com/twilio/twilio-java/pull/245","diff_url":"https://github.com/twilio/twilio-java/pull/245.diff","patch_url":"https://github.com/twilio/twilio-java/pull/245.patch","issue_url":"https://api.github.com/repos/twilio/twilio-java/issues/245","number":245,"state":"open","locked":false,"title":"Adding tasks_by_priority to task queue statistics","user":{"login":"wanjunsli","id":2490254,"avatar_url":"https://avatars.githubusercontent.com/u/2490254?v=3","gravatar_id":"","url":"https://api.github.com/users/wanjunsli","html_url":"https://github.com/wanjunsli","followers_url":"https://api.github.com/users/wanjunsli/followers","following_url":"https://api.github.com/users/wanjunsli/following{/other_user}","gists_url":"https://api.github.com/users/wanjunsli/gists{/gist_id}","starred_url":"https://api.github.com/users/wanjunsli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanjunsli/subscriptions","organizations_url":"https://api.github.com/users/wanjunsli/orgs","repos_url":"https://api.github.com/users/wanjunsli/repos","events_url":"https://api.github.com/users/wanjunsli/events{/privacy}","received_events_url":"https://api.github.com/users/wanjunsli/received_events","type":"User","site_admin":false},"body":"GET request to TaskQueue, Workflow and Workspace Statistics will have a field \"tasks_by_priority\" under RealTime Stats, similar to the \"tasks_by_status\" field. \r\n\r\nExample: \r\n\"tasks_by_priority\": {\"Priority-5\":1}","created_at":"2016-01-27T05:02:19Z","updated_at":"2016-01-28T19:41:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79e0dd36a1afae65df8a0431e9f487874ec44a51","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twilio/twilio-java/pulls/245/commits","review_comments_url":"https://api.github.com/repos/twilio/twilio-java/pulls/245/comments","review_comment_url":"https://api.github.com/repos/twilio/twilio-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twilio/twilio-java/issues/245/comments","statuses_url":"https://api.github.com/repos/twilio/twilio-java/statuses/47f7027758280db8f016a509d222c6d47d43161a","head":{"label":"wanjunsli:queue-stats-priority","ref":"queue-stats-priority","sha":"47f7027758280db8f016a509d222c6d47d43161a","user":{"login":"wanjunsli","id":2490254,"avatar_url":"https://avatars.githubusercontent.com/u/2490254?v=3","gravatar_id":"","url":"https://api.github.com/users/wanjunsli","html_url":"https://github.com/wanjunsli","followers_url":"https://api.github.com/users/wanjunsli/followers","following_url":"https://api.github.com/users/wanjunsli/following{/other_user}","gists_url":"https://api.github.com/users/wanjunsli/gists{/gist_id}","starred_url":"https://api.github.com/users/wanjunsli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanjunsli/subscriptions","organizations_url":"https://api.github.com/users/wanjunsli/orgs","repos_url":"https://api.github.com/users/wanjunsli/repos","events_url":"https://api.github.com/users/wanjunsli/events{/privacy}","received_events_url":"https://api.github.com/users/wanjunsli/received_events","type":"User","site_admin":false},"repo":{"id":48456189,"name":"twilio-java","full_name":"wanjunsli/twilio-java","owner":{"login":"wanjunsli","id":2490254,"avatar_url":"https://avatars.githubusercontent.com/u/2490254?v=3","gravatar_id":"","url":"https://api.github.com/users/wanjunsli","html_url":"https://github.com/wanjunsli","followers_url":"https://api.github.com/users/wanjunsli/followers","following_url":"https://api.github.com/users/wanjunsli/following{/other_user}","gists_url":"https://api.github.com/users/wanjunsli/gists{/gist_id}","starred_url":"https://api.github.com/users/wanjunsli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanjunsli/subscriptions","organizations_url":"https://api.github.com/users/wanjunsli/orgs","repos_url":"https://api.github.com/users/wanjunsli/repos","events_url":"https://api.github.com/users/wanjunsli/events{/privacy}","received_events_url":"https://api.github.com/users/wanjunsli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wanjunsli/twilio-java","description":"A Java library for communicating with the Twilio REST API and generating TwiML. Need help? E-mail us at help@twilio.com","fork":true,"url":"https://api.github.com/repos/wanjunsli/twilio-java","forks_url":"https://api.github.com/repos/wanjunsli/twilio-java/forks","keys_url":"https://api.github.com/repos/wanjunsli/twilio-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wanjunsli/twilio-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wanjunsli/twilio-java/teams","hooks_url":"https://api.github.com/repos/wanjunsli/twilio-java/hooks","issue_events_url":"https://api.github.com/repos/wanjunsli/twilio-java/issues/events{/number}","events_url":"https://api.github.com/repos/wanjunsli/twilio-java/events","assignees_url":"https://api.github.com/repos/wanjunsli/twilio-java/assignees{/user}","branches_url":"https://api.github.com/repos/wanjunsli/twilio-java/branches{/branch}","tags_url":"https://api.github.com/repos/wanjunsli/twilio-java/tags","blobs_url":"https://api.github.com/repos/wanjunsli/twilio-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wanjunsli/twilio-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wanjunsli/twilio-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/wanjunsli/twilio-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wanjunsli/twilio-java/statuses/{sha}","languages_url":"https://api.github.com/repos/wanjunsli/twilio-java/languages","stargazers_url":"https://api.github.com/repos/wanjunsli/twilio-java/stargazers","contributors_url":"https://api.github.com/repos/wanjunsli/twilio-java/contributors","subscribers_url":"https://api.github.com/repos/wanjunsli/twilio-java/subscribers","subscription_url":"https://api.github.com/repos/wanjunsli/twilio-java/subscription","commits_url":"https://api.github.com/repos/wanjunsli/twilio-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/wanjunsli/twilio-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/wanjunsli/twilio-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/wanjunsli/twilio-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/wanjunsli/twilio-java/contents/{+path}","compare_url":"https://api.github.com/repos/wanjunsli/twilio-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wanjunsli/twilio-java/merges","archive_url":"https://api.github.com/repos/wanjunsli/twilio-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wanjunsli/twilio-java/downloads","issues_url":"https://api.github.com/repos/wanjunsli/twilio-java/issues{/number}","pulls_url":"https://api.github.com/repos/wanjunsli/twilio-java/pulls{/number}","milestones_url":"https://api.github.com/repos/wanjunsli/twilio-java/milestones{/number}","notifications_url":"https://api.github.com/repos/wanjunsli/twilio-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wanjunsli/twilio-java/labels{/name}","releases_url":"https://api.github.com/repos/wanjunsli/twilio-java/releases{/id}","deployments_url":"https://api.github.com/repos/wanjunsli/twilio-java/deployments","created_at":"2015-12-22T22:04:27Z","updated_at":"2016-01-27T04:17:39Z","pushed_at":"2016-01-27T18:39:02Z","git_url":"git://github.com/wanjunsli/twilio-java.git","ssh_url":"git@github.com:wanjunsli/twilio-java.git","clone_url":"https://github.com/wanjunsli/twilio-java.git","svn_url":"https://github.com/wanjunsli/twilio-java","homepage":"http://www.twilio.com","size":8989,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"twilio:master","ref":"master","sha":"c49f3d6bb74742324b165cbbf5d6bd18bb1888f7","user":{"login":"twilio","id":109142,"avatar_url":"https://avatars.githubusercontent.com/u/109142?v=3","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"repo":{"id":307476,"name":"twilio-java","full_name":"twilio/twilio-java","owner":{"login":"twilio","id":109142,"avatar_url":"https://avatars.githubusercontent.com/u/109142?v=3","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twilio/twilio-java","description":"A Java library for communicating with the Twilio REST API and generating TwiML. Need help? E-mail us at help@twilio.com","fork":false,"url":"https://api.github.com/repos/twilio/twilio-java","forks_url":"https://api.github.com/repos/twilio/twilio-java/forks","keys_url":"https://api.github.com/repos/twilio/twilio-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twilio/twilio-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twilio/twilio-java/teams","hooks_url":"https://api.github.com/repos/twilio/twilio-java/hooks","issue_events_url":"https://api.github.com/repos/twilio/twilio-java/issues/events{/number}","events_url":"https://api.github.com/repos/twilio/twilio-java/events","assignees_url":"https://api.github.com/repos/twilio/twilio-java/assignees{/user}","branches_url":"https://api.github.com/repos/twilio/twilio-java/branches{/branch}","tags_url":"https://api.github.com/repos/twilio/twilio-java/tags","blobs_url":"https://api.github.com/repos/twilio/twilio-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twilio/twilio-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twilio/twilio-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/twilio/twilio-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twilio/twilio-java/statuses/{sha}","languages_url":"https://api.github.com/repos/twilio/twilio-java/languages","stargazers_url":"https://api.github.com/repos/twilio/twilio-java/stargazers","contributors_url":"https://api.github.com/repos/twilio/twilio-java/contributors","subscribers_url":"https://api.github.com/repos/twilio/twilio-java/subscribers","subscription_url":"https://api.github.com/repos/twilio/twilio-java/subscription","commits_url":"https://api.github.com/repos/twilio/twilio-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/twilio/twilio-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/twilio/twilio-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/twilio/twilio-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/twilio/twilio-java/contents/{+path}","compare_url":"https://api.github.com/repos/twilio/twilio-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twilio/twilio-java/merges","archive_url":"https://api.github.com/repos/twilio/twilio-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twilio/twilio-java/downloads","issues_url":"https://api.github.com/repos/twilio/twilio-java/issues{/number}","pulls_url":"https://api.github.com/repos/twilio/twilio-java/pulls{/number}","milestones_url":"https://api.github.com/repos/twilio/twilio-java/milestones{/number}","notifications_url":"https://api.github.com/repos/twilio/twilio-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twilio/twilio-java/labels{/name}","releases_url":"https://api.github.com/repos/twilio/twilio-java/releases{/id}","deployments_url":"https://api.github.com/repos/twilio/twilio-java/deployments","created_at":"2009-09-15T06:04:28Z","updated_at":"2016-01-27T15:44:07Z","pushed_at":"2016-01-27T18:39:03Z","git_url":"git://github.com/twilio/twilio-java.git","ssh_url":"git@github.com:twilio/twilio-java.git","clone_url":"https://github.com/twilio/twilio-java.git","svn_url":"https://github.com/twilio/twilio-java","homepage":"http://www.twilio.com","size":9554,"stargazers_count":190,"watchers_count":190,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":157,"mirror_url":null,"open_issues_count":57,"forks":157,"open_issues":57,"watchers":190,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/245"},"html":{"href":"https://github.com/twilio/twilio-java/pull/245"},"issue":{"href":"https://api.github.com/repos/twilio/twilio-java/issues/245"},"comments":{"href":"https://api.github.com/repos/twilio/twilio-java/issues/245/comments"},"review_comments":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/245/comments"},"review_comment":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twilio/twilio-java/pulls/245/commits"},"statuses":{"href":"https://api.github.com/repos/twilio/twilio-java/statuses/47f7027758280db8f016a509d222c6d47d43161a"}}}}