{"action":"created","comment":{"url":"https://api.github.com/repos/pzurek/zed/pulls/comments/41817817","id":41817817,"diff_hunk":"@@ -1,25 +1,117 @@\n package zd\n \n+import (\n+\t\"fmt\"\n+)\n+\n+type OrganizationWrapper struct {\n+\tOrganization *Organization `json:\"organization\"`\n+}\n+\n type OrganizationResponse struct {\n-\tOrganizations []Organization `json:\"organizations,omitempty\"`\n-\tNextPage      *string        `json:\"next_page,omitempty\"`\n-\tPreviousPage  *string        `json:\"previous_page,omitempty\"`\n-\tCount         *int           `json:\"count,omitempty\"`\n+\tOrganization *Organization `json:\"organization\"`\n+}\n+\n+type OrganizationListResponse struct {\n+\tOrganizations []Organization `json:\"organizations\"`\n+\tNextPage      string        `json:\"next_page,omitempty\"`\n+\tPreviousPage  string        `json:\"previous_page,omitempty\"`\n+\tCount         int           `json:\"count,omitempty\"`\n }\n \n type Organization struct {\n-\tURL                *string           `json:\"url,omitempty\"`\n-\tID                 *int              `json:\"id,omitempty\"`\n-\tName               *string           `json:\"name,omitempty\"`\n-\tSharedTickets      *bool             `json:\"shared_tickets,omitempty\"`\n-\tSharedComments     *bool             `json:\"shared_comments,omitempty\"`\n-\tExternalID         *string           `json:\"external_id,omitempty\"`\n-\tCreatedAt          *time.Time        `json:\"created_at,omitempty\"`\n-\tUpdatedAt          *time.Time        `json:\"updated_at,omitempty\"`\n+\tURL                string           `json:\"url,omitempty\"`\n+\tID                 int              `json:\"id,omitempty\"`\n+\tName               string           `json:\"name,omitempty\"`\n+\tSharedTickets      bool             `json:\"shared_tickets,omitempty\"`\n+\tSharedComments     bool             `json:\"shared_comments,omitempty\"`\n+\tExternalID         string           `json:\"external_id,omitempty\"`\n+\tCreatedAt          string           `json:\"created_at,omitempty\"`\n+\tUpdatedAt          string           `json:\"updated_at,omitempty\"`\n \tDomainNames        []string          `json:\"domain_names,omitempty\"`\n-\tDetails            *string           `json:\"details,omitempty\"`\n-\tNotes              *string           `json:\"notes,omitempty\"`\n-\tGroupID            *string           `json:\"group_id,omitempty\"`\n+\tDetails            string           `json:\"details,omitempty\"`\n+\tNotes              string           `json:\"notes,omitempty\"`\n+\tGroupID            string           `json:\"group_id,omitempty\"`\n \tTags               []string          `json:\"tags,omitempty\"`\n \tOrganizationFields map[string]string `json:\"organization_fields,omitempty\"`\n }\n+\n+// TicketService struct\n+type OrganizationService struct {\n+\tclient *Client\n+}\n+\n+// finds an organization in zendesk byt id","path":"organization.go","position":59,"original_position":59,"commit_id":"a9278f282d27196585f294a24a6f2dc579c08e95","original_commit_id":"a9278f282d27196585f294a24a6f2dc579c08e95","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"comment on exported method OrganizationService.GetOrganizationById should be of the form \"GetOrganizationById ...\"","created_at":"2015-10-13T01:04:40Z","updated_at":"2015-10-13T01:04:40Z","html_url":"https://github.com/pzurek/zed/pull/9#discussion_r41817817","pull_request_url":"https://api.github.com/repos/pzurek/zed/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/pzurek/zed/pulls/comments/41817817"},"html":{"href":"https://github.com/pzurek/zed/pull/9#discussion_r41817817"},"pull_request":{"href":"https://api.github.com/repos/pzurek/zed/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/pzurek/zed/pulls/9","id":47480839,"html_url":"https://github.com/pzurek/zed/pull/9","diff_url":"https://github.com/pzurek/zed/pull/9.diff","patch_url":"https://github.com/pzurek/zed/pull/9.patch","issue_url":"https://api.github.com/repos/pzurek/zed/issues/9","number":9,"state":"open","locked":false,"title":"Basic organization support","user":{"login":"jonnonz","id":2858492,"avatar_url":"https://avatars.githubusercontent.com/u/2858492?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnonz","html_url":"https://github.com/jonnonz","followers_url":"https://api.github.com/users/jonnonz/followers","following_url":"https://api.github.com/users/jonnonz/following{/other_user}","gists_url":"https://api.github.com/users/jonnonz/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnonz/subscriptions","organizations_url":"https://api.github.com/users/jonnonz/orgs","repos_url":"https://api.github.com/users/jonnonz/repos","events_url":"https://api.github.com/users/jonnonz/events{/privacy}","received_events_url":"https://api.github.com/users/jonnonz/received_events","type":"User","site_admin":false},"body":"Allows you to get orgs , update orgs, create orgs in Zendesk ","created_at":"2015-10-13T01:04:27Z","updated_at":"2015-10-13T01:04:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pzurek/zed/pulls/9/commits","review_comments_url":"https://api.github.com/repos/pzurek/zed/pulls/9/comments","review_comment_url":"https://api.github.com/repos/pzurek/zed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pzurek/zed/issues/9/comments","statuses_url":"https://api.github.com/repos/pzurek/zed/statuses/a9278f282d27196585f294a24a6f2dc579c08e95","head":{"label":"jonnonz:upgrades-to-zed","ref":"upgrades-to-zed","sha":"a9278f282d27196585f294a24a6f2dc579c08e95","user":{"login":"jonnonz","id":2858492,"avatar_url":"https://avatars.githubusercontent.com/u/2858492?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnonz","html_url":"https://github.com/jonnonz","followers_url":"https://api.github.com/users/jonnonz/followers","following_url":"https://api.github.com/users/jonnonz/following{/other_user}","gists_url":"https://api.github.com/users/jonnonz/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnonz/subscriptions","organizations_url":"https://api.github.com/users/jonnonz/orgs","repos_url":"https://api.github.com/users/jonnonz/repos","events_url":"https://api.github.com/users/jonnonz/events{/privacy}","received_events_url":"https://api.github.com/users/jonnonz/received_events","type":"User","site_admin":false},"repo":{"id":44137294,"name":"zed","full_name":"jonnonz/zed","owner":{"login":"jonnonz","id":2858492,"avatar_url":"https://avatars.githubusercontent.com/u/2858492?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnonz","html_url":"https://github.com/jonnonz","followers_url":"https://api.github.com/users/jonnonz/followers","following_url":"https://api.github.com/users/jonnonz/following{/other_user}","gists_url":"https://api.github.com/users/jonnonz/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnonz/subscriptions","organizations_url":"https://api.github.com/users/jonnonz/orgs","repos_url":"https://api.github.com/users/jonnonz/repos","events_url":"https://api.github.com/users/jonnonz/events{/privacy}","received_events_url":"https://api.github.com/users/jonnonz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonnonz/zed","description":"Go client for the Zendesk API","fork":true,"url":"https://api.github.com/repos/jonnonz/zed","forks_url":"https://api.github.com/repos/jonnonz/zed/forks","keys_url":"https://api.github.com/repos/jonnonz/zed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonnonz/zed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonnonz/zed/teams","hooks_url":"https://api.github.com/repos/jonnonz/zed/hooks","issue_events_url":"https://api.github.com/repos/jonnonz/zed/issues/events{/number}","events_url":"https://api.github.com/repos/jonnonz/zed/events","assignees_url":"https://api.github.com/repos/jonnonz/zed/assignees{/user}","branches_url":"https://api.github.com/repos/jonnonz/zed/branches{/branch}","tags_url":"https://api.github.com/repos/jonnonz/zed/tags","blobs_url":"https://api.github.com/repos/jonnonz/zed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonnonz/zed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonnonz/zed/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonnonz/zed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonnonz/zed/statuses/{sha}","languages_url":"https://api.github.com/repos/jonnonz/zed/languages","stargazers_url":"https://api.github.com/repos/jonnonz/zed/stargazers","contributors_url":"https://api.github.com/repos/jonnonz/zed/contributors","subscribers_url":"https://api.github.com/repos/jonnonz/zed/subscribers","subscription_url":"https://api.github.com/repos/jonnonz/zed/subscription","commits_url":"https://api.github.com/repos/jonnonz/zed/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonnonz/zed/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonnonz/zed/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonnonz/zed/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonnonz/zed/contents/{+path}","compare_url":"https://api.github.com/repos/jonnonz/zed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonnonz/zed/merges","archive_url":"https://api.github.com/repos/jonnonz/zed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonnonz/zed/downloads","issues_url":"https://api.github.com/repos/jonnonz/zed/issues{/number}","pulls_url":"https://api.github.com/repos/jonnonz/zed/pulls{/number}","milestones_url":"https://api.github.com/repos/jonnonz/zed/milestones{/number}","notifications_url":"https://api.github.com/repos/jonnonz/zed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonnonz/zed/labels{/name}","releases_url":"https://api.github.com/repos/jonnonz/zed/releases{/id}","created_at":"2015-10-12T22:18:48Z","updated_at":"2015-10-12T22:18:49Z","pushed_at":"2015-10-13T01:03:04Z","git_url":"git://github.com/jonnonz/zed.git","ssh_url":"git@github.com:jonnonz/zed.git","clone_url":"https://github.com/jonnonz/zed.git","svn_url":"https://github.com/jonnonz/zed","homepage":null,"size":294,"stargazers_count":0,"watchers_count":0,"language":"Go","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":0,"default_branch":"master"}},"base":{"label":"pzurek:master","ref":"master","sha":"58841fb490092257f919e090a66697fdfe7d1739","user":{"login":"pzurek","id":10070,"avatar_url":"https://avatars.githubusercontent.com/u/10070?v=3","gravatar_id":"","url":"https://api.github.com/users/pzurek","html_url":"https://github.com/pzurek","followers_url":"https://api.github.com/users/pzurek/followers","following_url":"https://api.github.com/users/pzurek/following{/other_user}","gists_url":"https://api.github.com/users/pzurek/gists{/gist_id}","starred_url":"https://api.github.com/users/pzurek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pzurek/subscriptions","organizations_url":"https://api.github.com/users/pzurek/orgs","repos_url":"https://api.github.com/users/pzurek/repos","events_url":"https://api.github.com/users/pzurek/events{/privacy}","received_events_url":"https://api.github.com/users/pzurek/received_events","type":"User","site_admin":false},"repo":{"id":20942656,"name":"zed","full_name":"pzurek/zed","owner":{"login":"pzurek","id":10070,"avatar_url":"https://avatars.githubusercontent.com/u/10070?v=3","gravatar_id":"","url":"https://api.github.com/users/pzurek","html_url":"https://github.com/pzurek","followers_url":"https://api.github.com/users/pzurek/followers","following_url":"https://api.github.com/users/pzurek/following{/other_user}","gists_url":"https://api.github.com/users/pzurek/gists{/gist_id}","starred_url":"https://api.github.com/users/pzurek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pzurek/subscriptions","organizations_url":"https://api.github.com/users/pzurek/orgs","repos_url":"https://api.github.com/users/pzurek/repos","events_url":"https://api.github.com/users/pzurek/events{/privacy}","received_events_url":"https://api.github.com/users/pzurek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pzurek/zed","description":"Go client for the Zendesk API","fork":false,"url":"https://api.github.com/repos/pzurek/zed","forks_url":"https://api.github.com/repos/pzurek/zed/forks","keys_url":"https://api.github.com/repos/pzurek/zed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pzurek/zed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pzurek/zed/teams","hooks_url":"https://api.github.com/repos/pzurek/zed/hooks","issue_events_url":"https://api.github.com/repos/pzurek/zed/issues/events{/number}","events_url":"https://api.github.com/repos/pzurek/zed/events","assignees_url":"https://api.github.com/repos/pzurek/zed/assignees{/user}","branches_url":"https://api.github.com/repos/pzurek/zed/branches{/branch}","tags_url":"https://api.github.com/repos/pzurek/zed/tags","blobs_url":"https://api.github.com/repos/pzurek/zed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pzurek/zed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pzurek/zed/git/refs{/sha}","trees_url":"https://api.github.com/repos/pzurek/zed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pzurek/zed/statuses/{sha}","languages_url":"https://api.github.com/repos/pzurek/zed/languages","stargazers_url":"https://api.github.com/repos/pzurek/zed/stargazers","contributors_url":"https://api.github.com/repos/pzurek/zed/contributors","subscribers_url":"https://api.github.com/repos/pzurek/zed/subscribers","subscription_url":"https://api.github.com/repos/pzurek/zed/subscription","commits_url":"https://api.github.com/repos/pzurek/zed/commits{/sha}","git_commits_url":"https://api.github.com/repos/pzurek/zed/git/commits{/sha}","comments_url":"https://api.github.com/repos/pzurek/zed/comments{/number}","issue_comment_url":"https://api.github.com/repos/pzurek/zed/issues/comments{/number}","contents_url":"https://api.github.com/repos/pzurek/zed/contents/{+path}","compare_url":"https://api.github.com/repos/pzurek/zed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pzurek/zed/merges","archive_url":"https://api.github.com/repos/pzurek/zed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pzurek/zed/downloads","issues_url":"https://api.github.com/repos/pzurek/zed/issues{/number}","pulls_url":"https://api.github.com/repos/pzurek/zed/pulls{/number}","milestones_url":"https://api.github.com/repos/pzurek/zed/milestones{/number}","notifications_url":"https://api.github.com/repos/pzurek/zed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pzurek/zed/labels{/name}","releases_url":"https://api.github.com/repos/pzurek/zed/releases{/id}","created_at":"2014-06-17T23:19:47Z","updated_at":"2014-09-05T03:14:54Z","pushed_at":"2015-10-13T01:04:27Z","git_url":"git://github.com/pzurek/zed.git","ssh_url":"git@github.com:pzurek/zed.git","clone_url":"https://github.com/pzurek/zed.git","svn_url":"https://github.com/pzurek/zed","homepage":null,"size":294,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pzurek/zed/pulls/9"},"html":{"href":"https://github.com/pzurek/zed/pull/9"},"issue":{"href":"https://api.github.com/repos/pzurek/zed/issues/9"},"comments":{"href":"https://api.github.com/repos/pzurek/zed/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/pzurek/zed/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/pzurek/zed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pzurek/zed/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/pzurek/zed/statuses/a9278f282d27196585f294a24a6f2dc579c08e95"}}}}