{"action":"created","comment":{"url":"https://api.github.com/repos/govau/notify-client-go/pulls/comments/292253962","pull_request_review_id":247922337,"id":292253962,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MjI1Mzk2Mg==","diff_hunk":"@@ -69,12 +70,50 @@ func NewClient(apiKey string, options ...ClientOption) (*Client, error) {\n \treturn &Client{client}, nil\n }\n \n-func (c Client) Templates() (Templates, error) {\n+func (c Client) TemplateByID(templateID string) (Template, error) {\n+\tvar template Template\n+\terr := c.c.Get(\"./v2/template/\" + templateID).JSON(&template).Error\n+\treturn template, err\n+}\n+\n+func (c Client) TemplateVersion(templateID string, version int) (Template, error) {\n+\turl := \"/v2/template/\" + templateID + \"/version/\" + strconv.Itoa(version)\n+\tvar template Template\n+\terr := c.c.Get(url).JSON(&template).Error\n+\treturn template, err\n+}\n+\n+func (c Client) Templates(templateType string) (Templates, error) {\n+\turl := \"./v2/templates\"\n+\tif templateType != \"\" {\n+\t\turl += \"?type=\" + templateType\n+\t}\n+\n \tvar templates Templates\n-\terr := c.c.Get(\"./v2/templates\").JSON(&templates, \"templates\").Error\n+\terr := c.c.Get(url).JSON(&templates, \"templates\").Error\n \treturn templates, err\n }\n \n+func (c Client) TemplatePreview(templateID string, personalisation ...PersonalisationOption) (TemplatePreview, error) {\n+","path":"client.go","position":39,"original_position":39,"commit_id":"e497825813255ca0c791ab57877891d642d8bb81","original_commit_id":"e497825813255ca0c791ab57877891d642d8bb81","user":{"login":"jonathaningram","id":626664,"node_id":"MDQ6VXNlcjYyNjY2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/626664?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathaningram","html_url":"https://github.com/jonathaningram","followers_url":"https://api.github.com/users/jonathaningram/followers","following_url":"https://api.github.com/users/jonathaningram/following{/other_user}","gists_url":"https://api.github.com/users/jonathaningram/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathaningram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathaningram/subscriptions","organizations_url":"https://api.github.com/users/jonathaningram/orgs","repos_url":"https://api.github.com/users/jonathaningram/repos","events_url":"https://api.github.com/users/jonathaningram/events{/privacy}","received_events_url":"https://api.github.com/users/jonathaningram/received_events","type":"User","site_admin":false},"body":"@andrewoh531 `templateID` to `id`, and remove newline after method signature.","created_at":"2019-06-11T02:06:37Z","updated_at":"2019-06-11T02:17:43Z","html_url":"https://github.com/govau/notify-client-go/pull/3#discussion_r292253962","pull_request_url":"https://api.github.com/repos/govau/notify-client-go/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/comments/292253962"},"html":{"href":"https://github.com/govau/notify-client-go/pull/3#discussion_r292253962"},"pull_request":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/govau/notify-client-go/pulls/3","id":286894524,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2ODk0NTI0","html_url":"https://github.com/govau/notify-client-go/pull/3","diff_url":"https://github.com/govau/notify-client-go/pull/3.diff","patch_url":"https://github.com/govau/notify-client-go/pull/3.patch","issue_url":"https://api.github.com/repos/govau/notify-client-go/issues/3","number":3,"state":"open","locked":false,"title":"Add TemplateByID, TemplateVersion, Templates and TemplatePreview","user":{"login":"andrewoh531","id":4927570,"node_id":"MDQ6VXNlcjQ5Mjc1NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/4927570?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewoh531","html_url":"https://github.com/andrewoh531","followers_url":"https://api.github.com/users/andrewoh531/followers","following_url":"https://api.github.com/users/andrewoh531/following{/other_user}","gists_url":"https://api.github.com/users/andrewoh531/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewoh531/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewoh531/subscriptions","organizations_url":"https://api.github.com/users/andrewoh531/orgs","repos_url":"https://api.github.com/users/andrewoh531/repos","events_url":"https://api.github.com/users/andrewoh531/events{/privacy}","received_events_url":"https://api.github.com/users/andrewoh531/received_events","type":"User","site_admin":false},"body":"…o add integration tests.","created_at":"2019-06-11T01:58:04Z","updated_at":"2019-06-11T02:17:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5610cad8eda5948b9518a848b71009c5039bb0c3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dagoof","id":212986,"node_id":"MDQ6VXNlcjIxMjk4Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/212986?v=4","gravatar_id":"","url":"https://api.github.com/users/dagoof","html_url":"https://github.com/dagoof","followers_url":"https://api.github.com/users/dagoof/followers","following_url":"https://api.github.com/users/dagoof/following{/other_user}","gists_url":"https://api.github.com/users/dagoof/gists{/gist_id}","starred_url":"https://api.github.com/users/dagoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagoof/subscriptions","organizations_url":"https://api.github.com/users/dagoof/orgs","repos_url":"https://api.github.com/users/dagoof/repos","events_url":"https://api.github.com/users/dagoof/events{/privacy}","received_events_url":"https://api.github.com/users/dagoof/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/govau/notify-client-go/pulls/3/commits","review_comments_url":"https://api.github.com/repos/govau/notify-client-go/pulls/3/comments","review_comment_url":"https://api.github.com/repos/govau/notify-client-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/govau/notify-client-go/issues/3/comments","statuses_url":"https://api.github.com/repos/govau/notify-client-go/statuses/e497825813255ca0c791ab57877891d642d8bb81","head":{"label":"govau:feat-templates","ref":"feat-templates","sha":"e497825813255ca0c791ab57877891d642d8bb81","user":{"login":"govau","id":25235510,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjM1NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/25235510?v=4","gravatar_id":"","url":"https://api.github.com/users/govau","html_url":"https://github.com/govau","followers_url":"https://api.github.com/users/govau/followers","following_url":"https://api.github.com/users/govau/following{/other_user}","gists_url":"https://api.github.com/users/govau/gists{/gist_id}","starred_url":"https://api.github.com/users/govau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govau/subscriptions","organizations_url":"https://api.github.com/users/govau/orgs","repos_url":"https://api.github.com/users/govau/repos","events_url":"https://api.github.com/users/govau/events{/privacy}","received_events_url":"https://api.github.com/users/govau/received_events","type":"Organization","site_admin":false},"repo":{"id":183152118,"node_id":"MDEwOlJlcG9zaXRvcnkxODMxNTIxMTg=","name":"notify-client-go","full_name":"govau/notify-client-go","private":false,"owner":{"login":"govau","id":25235510,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjM1NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/25235510?v=4","gravatar_id":"","url":"https://api.github.com/users/govau","html_url":"https://github.com/govau","followers_url":"https://api.github.com/users/govau/followers","following_url":"https://api.github.com/users/govau/following{/other_user}","gists_url":"https://api.github.com/users/govau/gists{/gist_id}","starred_url":"https://api.github.com/users/govau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govau/subscriptions","organizations_url":"https://api.github.com/users/govau/orgs","repos_url":"https://api.github.com/users/govau/repos","events_url":"https://api.github.com/users/govau/events{/privacy}","received_events_url":"https://api.github.com/users/govau/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/govau/notify-client-go","description":"Go client for Notify.gov.au","fork":false,"url":"https://api.github.com/repos/govau/notify-client-go","forks_url":"https://api.github.com/repos/govau/notify-client-go/forks","keys_url":"https://api.github.com/repos/govau/notify-client-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/govau/notify-client-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/govau/notify-client-go/teams","hooks_url":"https://api.github.com/repos/govau/notify-client-go/hooks","issue_events_url":"https://api.github.com/repos/govau/notify-client-go/issues/events{/number}","events_url":"https://api.github.com/repos/govau/notify-client-go/events","assignees_url":"https://api.github.com/repos/govau/notify-client-go/assignees{/user}","branches_url":"https://api.github.com/repos/govau/notify-client-go/branches{/branch}","tags_url":"https://api.github.com/repos/govau/notify-client-go/tags","blobs_url":"https://api.github.com/repos/govau/notify-client-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/govau/notify-client-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/govau/notify-client-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/govau/notify-client-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/govau/notify-client-go/statuses/{sha}","languages_url":"https://api.github.com/repos/govau/notify-client-go/languages","stargazers_url":"https://api.github.com/repos/govau/notify-client-go/stargazers","contributors_url":"https://api.github.com/repos/govau/notify-client-go/contributors","subscribers_url":"https://api.github.com/repos/govau/notify-client-go/subscribers","subscription_url":"https://api.github.com/repos/govau/notify-client-go/subscription","commits_url":"https://api.github.com/repos/govau/notify-client-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/govau/notify-client-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/govau/notify-client-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/govau/notify-client-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/govau/notify-client-go/contents/{+path}","compare_url":"https://api.github.com/repos/govau/notify-client-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/govau/notify-client-go/merges","archive_url":"https://api.github.com/repos/govau/notify-client-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/govau/notify-client-go/downloads","issues_url":"https://api.github.com/repos/govau/notify-client-go/issues{/number}","pulls_url":"https://api.github.com/repos/govau/notify-client-go/pulls{/number}","milestones_url":"https://api.github.com/repos/govau/notify-client-go/milestones{/number}","notifications_url":"https://api.github.com/repos/govau/notify-client-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/govau/notify-client-go/labels{/name}","releases_url":"https://api.github.com/repos/govau/notify-client-go/releases{/id}","deployments_url":"https://api.github.com/repos/govau/notify-client-go/deployments","created_at":"2019-04-24T05:07:35Z","updated_at":"2019-05-10T04:52:32Z","pushed_at":"2019-06-11T01:58:05Z","git_url":"git://github.com/govau/notify-client-go.git","ssh_url":"git@github.com:govau/notify-client-go.git","clone_url":"https://github.com/govau/notify-client-go.git","svn_url":"https://github.com/govau/notify-client-go","homepage":"https://notify.gov.au","size":5,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"govau:master","ref":"master","sha":"760f263f3bef1f2b040a2473369165c0b63e8346","user":{"login":"govau","id":25235510,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjM1NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/25235510?v=4","gravatar_id":"","url":"https://api.github.com/users/govau","html_url":"https://github.com/govau","followers_url":"https://api.github.com/users/govau/followers","following_url":"https://api.github.com/users/govau/following{/other_user}","gists_url":"https://api.github.com/users/govau/gists{/gist_id}","starred_url":"https://api.github.com/users/govau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govau/subscriptions","organizations_url":"https://api.github.com/users/govau/orgs","repos_url":"https://api.github.com/users/govau/repos","events_url":"https://api.github.com/users/govau/events{/privacy}","received_events_url":"https://api.github.com/users/govau/received_events","type":"Organization","site_admin":false},"repo":{"id":183152118,"node_id":"MDEwOlJlcG9zaXRvcnkxODMxNTIxMTg=","name":"notify-client-go","full_name":"govau/notify-client-go","private":false,"owner":{"login":"govau","id":25235510,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjM1NTEw","avatar_url":"https://avatars3.githubusercontent.com/u/25235510?v=4","gravatar_id":"","url":"https://api.github.com/users/govau","html_url":"https://github.com/govau","followers_url":"https://api.github.com/users/govau/followers","following_url":"https://api.github.com/users/govau/following{/other_user}","gists_url":"https://api.github.com/users/govau/gists{/gist_id}","starred_url":"https://api.github.com/users/govau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govau/subscriptions","organizations_url":"https://api.github.com/users/govau/orgs","repos_url":"https://api.github.com/users/govau/repos","events_url":"https://api.github.com/users/govau/events{/privacy}","received_events_url":"https://api.github.com/users/govau/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/govau/notify-client-go","description":"Go client for Notify.gov.au","fork":false,"url":"https://api.github.com/repos/govau/notify-client-go","forks_url":"https://api.github.com/repos/govau/notify-client-go/forks","keys_url":"https://api.github.com/repos/govau/notify-client-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/govau/notify-client-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/govau/notify-client-go/teams","hooks_url":"https://api.github.com/repos/govau/notify-client-go/hooks","issue_events_url":"https://api.github.com/repos/govau/notify-client-go/issues/events{/number}","events_url":"https://api.github.com/repos/govau/notify-client-go/events","assignees_url":"https://api.github.com/repos/govau/notify-client-go/assignees{/user}","branches_url":"https://api.github.com/repos/govau/notify-client-go/branches{/branch}","tags_url":"https://api.github.com/repos/govau/notify-client-go/tags","blobs_url":"https://api.github.com/repos/govau/notify-client-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/govau/notify-client-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/govau/notify-client-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/govau/notify-client-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/govau/notify-client-go/statuses/{sha}","languages_url":"https://api.github.com/repos/govau/notify-client-go/languages","stargazers_url":"https://api.github.com/repos/govau/notify-client-go/stargazers","contributors_url":"https://api.github.com/repos/govau/notify-client-go/contributors","subscribers_url":"https://api.github.com/repos/govau/notify-client-go/subscribers","subscription_url":"https://api.github.com/repos/govau/notify-client-go/subscription","commits_url":"https://api.github.com/repos/govau/notify-client-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/govau/notify-client-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/govau/notify-client-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/govau/notify-client-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/govau/notify-client-go/contents/{+path}","compare_url":"https://api.github.com/repos/govau/notify-client-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/govau/notify-client-go/merges","archive_url":"https://api.github.com/repos/govau/notify-client-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/govau/notify-client-go/downloads","issues_url":"https://api.github.com/repos/govau/notify-client-go/issues{/number}","pulls_url":"https://api.github.com/repos/govau/notify-client-go/pulls{/number}","milestones_url":"https://api.github.com/repos/govau/notify-client-go/milestones{/number}","notifications_url":"https://api.github.com/repos/govau/notify-client-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/govau/notify-client-go/labels{/name}","releases_url":"https://api.github.com/repos/govau/notify-client-go/releases{/id}","deployments_url":"https://api.github.com/repos/govau/notify-client-go/deployments","created_at":"2019-04-24T05:07:35Z","updated_at":"2019-05-10T04:52:32Z","pushed_at":"2019-06-11T01:58:05Z","git_url":"git://github.com/govau/notify-client-go.git","ssh_url":"git@github.com:govau/notify-client-go.git","clone_url":"https://github.com/govau/notify-client-go.git","svn_url":"https://github.com/govau/notify-client-go","homepage":"https://notify.gov.au","size":5,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/3"},"html":{"href":"https://github.com/govau/notify-client-go/pull/3"},"issue":{"href":"https://api.github.com/repos/govau/notify-client-go/issues/3"},"comments":{"href":"https://api.github.com/repos/govau/notify-client-go/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/govau/notify-client-go/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/govau/notify-client-go/statuses/e497825813255ca0c791ab57877891d642d8bb81"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jonathaningram"}}