{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/go-neb/pulls/comments/86158172","pull_request_review_id":6829407,"id":86158172,"diff_hunk":"@@ -8,31 +16,68 @@ import (\n \n // ConfigureAuthRealmRequest is a request to /configureAuthRealm\n type ConfigureAuthRealmRequest struct {\n-\tID     string\n-\tType   string\n+\t// An arbitrary unique identifier for this auth realm. This can be anything.\n+\t// Using the same ID will REPLACE the entire AuthRealm with the new information.\n+\tID string\n+\t// The type of auth realm. This determines which code is loaded to execute the\n+\t// auth realm. It must be a known type.\n+\tType string\n+\t// AuthRealm specific config information. See the docs for the auth realm you're interested in.\n+\tConfig json.RawMessage\n+}\n+\n+// RequestAuthSessionRequest is a request to /requestAuthSession\n+type RequestAuthSessionRequest struct {\n+\t// The realm ID to request a new auth session on. The realm MUST already exist.\n+\tRealmID string\n+\t// The user ID of user requesting the auth session. If the auth is successful,\n+\t// this user ID will be associated with the third-party credentials obtained.\n+\tUserID string\n+\t// AuthRealm specific config information. See the docs for the auth realm you're interested in.\n \tConfig json.RawMessage\n }\n \n // ConfigureServiceRequest is a request to /configureService\n type ConfigureServiceRequest struct {\n-\tID     string\n-\tType   string\n+\t// An arbitrary unique identifier for this service. This can be anything.\n+\t// Using the same ID will REPLACE the entire Service with the new information.\n+\tID string\n+\t// The type of service. This determines which code is loaded to execute the\n+\t// service. It must be a known type.\n+\tType string\n+\t// The user ID of the configured client who will be controlled by this service.\n+\t// The user MUST already be configured.\n \tUserID string\n+\t// Service-specific config information. See the docs for the service you're interested in.\n \tConfig json.RawMessage\n }\n \n-// A ClientConfig is the configuration for a matrix client for a bot to use. It is\n-// a request to /configureClient\n+// A ClientConfig contains the configuration information for a matrix client so that\n+// Go-NEB can drive it. It forms the HTTP body to /configureClient requests.\n type ClientConfig struct {\n-\tUserID        string // The matrix UserId to connect with.\n-\tHomeserverURL string // A URL with the host and port of the matrix server. E.g. https://matrix.org:8448\n-\tAccessToken   string // The matrix access token to authenticate the requests with.\n-\tSync          bool   // True to start a sync stream for this user\n-\tAutoJoinRooms bool   // True to automatically join all rooms for this user\n-\tDisplayName   string // The display name to set for the matrix client\n+\t// The matrix User ID to connect with. E.g. @alice:matrix.org\n+\tUserID string\n+\t// A URL with the host and port of the matrix server. E.g. https://matrix.org:8448\n+\tHomeserverURL string\n+\t// The matrix access token to authenticate the requests with.\n+\tAccessToken string\n+\t// True to start a sync stream for this user. If false, no /sync goroutine will be\n+\t// created and this client will be unable to receive new events from Matrix. For services\n+\t// which only SEND events into Matrix, it may be desirable to set Sync to false to reduce the\n+\t// number of goroutines Go-NEB has to maintain. For services which respond to !commands,\n+\t// Sync MUST be set to true in order to receive those commands.\n+\tSync bool\n+\t// True to automatically join every room this client is invited to.\n+\t// This is desirable for services which have !commands as that means anyone can pull the bot\n+\t// into the room. It is up to the service to decide which, if any, users to respond to however.\n+\tAutoJoinRooms bool\n+\t// The desired display name for this client.\n+\t// This does not automatically set the display name for this client. See /configureClient.\n+\tDisplayName string\n }\n \n-// SessionRequest are usually multi-stage things so this type only exists for the config form\n+// SessionRequests are usually multi-stage things so this type only exists for the config form\n+// for use with ConfigFile.","path":"src/github.com/matrix-org/go-neb/api/api.go","position":90,"original_position":90,"commit_id":"81e1859cb450c88dacd6103193962eee09187edf","original_commit_id":"81e1859cb450c88dacd6103193962eee09187edf","user":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"body":"Done - badly named struct.","created_at":"2016-11-02T14:48:03Z","updated_at":"2016-11-02T14:48:03Z","html_url":"https://github.com/matrix-org/go-neb/pull/108#discussion_r86158172","pull_request_url":"https://api.github.com/repos/matrix-org/go-neb/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/comments/86158172"},"html":{"href":"https://github.com/matrix-org/go-neb/pull/108#discussion_r86158172"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/go-neb/pulls/108","id":91949875,"html_url":"https://github.com/matrix-org/go-neb/pull/108","diff_url":"https://github.com/matrix-org/go-neb/pull/108.diff","patch_url":"https://github.com/matrix-org/go-neb/pull/108.patch","issue_url":"https://api.github.com/repos/matrix-org/go-neb/issues/108","number":108,"state":"open","locked":false,"title":"Add HTTP API docs","user":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"body":"This all gets formatted correctly by `godoc`. There is no hosted version of these docs yet (on GH-Pages, godoc.org, or otherwise) hence I have not removed the docs in the README yet.","created_at":"2016-11-02T11:11:26Z","updated_at":"2016-11-02T14:48:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17e7875cf95f27d5a57b3771d0ddc813f5dc10ef","assignee":{"login":"NegativeMjark","id":904009,"avatar_url":"https://avatars.githubusercontent.com/u/904009?v=3","gravatar_id":"","url":"https://api.github.com/users/NegativeMjark","html_url":"https://github.com/NegativeMjark","followers_url":"https://api.github.com/users/NegativeMjark/followers","following_url":"https://api.github.com/users/NegativeMjark/following{/other_user}","gists_url":"https://api.github.com/users/NegativeMjark/gists{/gist_id}","starred_url":"https://api.github.com/users/NegativeMjark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NegativeMjark/subscriptions","organizations_url":"https://api.github.com/users/NegativeMjark/orgs","repos_url":"https://api.github.com/users/NegativeMjark/repos","events_url":"https://api.github.com/users/NegativeMjark/events{/privacy}","received_events_url":"https://api.github.com/users/NegativeMjark/received_events","type":"User","site_admin":false},"assignees":[{"login":"NegativeMjark","id":904009,"avatar_url":"https://avatars.githubusercontent.com/u/904009?v=3","gravatar_id":"","url":"https://api.github.com/users/NegativeMjark","html_url":"https://github.com/NegativeMjark","followers_url":"https://api.github.com/users/NegativeMjark/followers","following_url":"https://api.github.com/users/NegativeMjark/following{/other_user}","gists_url":"https://api.github.com/users/NegativeMjark/gists{/gist_id}","starred_url":"https://api.github.com/users/NegativeMjark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NegativeMjark/subscriptions","organizations_url":"https://api.github.com/users/NegativeMjark/orgs","repos_url":"https://api.github.com/users/NegativeMjark/repos","events_url":"https://api.github.com/users/NegativeMjark/events{/privacy}","received_events_url":"https://api.github.com/users/NegativeMjark/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/go-neb/pulls/108/commits","review_comments_url":"https://api.github.com/repos/matrix-org/go-neb/pulls/108/comments","review_comment_url":"https://api.github.com/repos/matrix-org/go-neb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/go-neb/issues/108/comments","statuses_url":"https://api.github.com/repos/matrix-org/go-neb/statuses/81e1859cb450c88dacd6103193962eee09187edf","head":{"label":"matrix-org:kegan/all-the-docs","ref":"kegan/all-the-docs","sha":"81e1859cb450c88dacd6103193962eee09187edf","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":64469341,"name":"go-neb","full_name":"matrix-org/go-neb","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/go-neb","description":"Extensible matrix bot written in Go","fork":false,"url":"https://api.github.com/repos/matrix-org/go-neb","forks_url":"https://api.github.com/repos/matrix-org/go-neb/forks","keys_url":"https://api.github.com/repos/matrix-org/go-neb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/go-neb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/go-neb/teams","hooks_url":"https://api.github.com/repos/matrix-org/go-neb/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/go-neb/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/go-neb/events","assignees_url":"https://api.github.com/repos/matrix-org/go-neb/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/go-neb/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/go-neb/tags","blobs_url":"https://api.github.com/repos/matrix-org/go-neb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/go-neb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/go-neb/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/go-neb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/go-neb/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/go-neb/languages","stargazers_url":"https://api.github.com/repos/matrix-org/go-neb/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/go-neb/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/go-neb/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/go-neb/subscription","commits_url":"https://api.github.com/repos/matrix-org/go-neb/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/go-neb/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/go-neb/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/go-neb/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/go-neb/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/go-neb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/go-neb/merges","archive_url":"https://api.github.com/repos/matrix-org/go-neb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/go-neb/downloads","issues_url":"https://api.github.com/repos/matrix-org/go-neb/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/go-neb/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/go-neb/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/go-neb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/go-neb/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/go-neb/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/go-neb/deployments","created_at":"2016-07-29T09:39:03Z","updated_at":"2016-10-26T21:25:26Z","pushed_at":"2016-11-02T11:11:26Z","git_url":"git://github.com/matrix-org/go-neb.git","ssh_url":"git@github.com:matrix-org/go-neb.git","clone_url":"https://github.com/matrix-org/go-neb.git","svn_url":"https://github.com/matrix-org/go-neb","homepage":null,"size":9706,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":22,"forks":3,"open_issues":22,"watchers":11,"default_branch":"master"}},"base":{"label":"matrix-org:master","ref":"master","sha":"a51497d36fb0e5683097fd2001ff70b7fb1857b0","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":64469341,"name":"go-neb","full_name":"matrix-org/go-neb","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/go-neb","description":"Extensible matrix bot written in Go","fork":false,"url":"https://api.github.com/repos/matrix-org/go-neb","forks_url":"https://api.github.com/repos/matrix-org/go-neb/forks","keys_url":"https://api.github.com/repos/matrix-org/go-neb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/go-neb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/go-neb/teams","hooks_url":"https://api.github.com/repos/matrix-org/go-neb/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/go-neb/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/go-neb/events","assignees_url":"https://api.github.com/repos/matrix-org/go-neb/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/go-neb/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/go-neb/tags","blobs_url":"https://api.github.com/repos/matrix-org/go-neb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/go-neb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/go-neb/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/go-neb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/go-neb/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/go-neb/languages","stargazers_url":"https://api.github.com/repos/matrix-org/go-neb/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/go-neb/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/go-neb/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/go-neb/subscription","commits_url":"https://api.github.com/repos/matrix-org/go-neb/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/go-neb/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/go-neb/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/go-neb/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/go-neb/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/go-neb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/go-neb/merges","archive_url":"https://api.github.com/repos/matrix-org/go-neb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/go-neb/downloads","issues_url":"https://api.github.com/repos/matrix-org/go-neb/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/go-neb/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/go-neb/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/go-neb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/go-neb/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/go-neb/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/go-neb/deployments","created_at":"2016-07-29T09:39:03Z","updated_at":"2016-10-26T21:25:26Z","pushed_at":"2016-11-02T11:11:26Z","git_url":"git://github.com/matrix-org/go-neb.git","ssh_url":"git@github.com:matrix-org/go-neb.git","clone_url":"https://github.com/matrix-org/go-neb.git","svn_url":"https://github.com/matrix-org/go-neb","homepage":null,"size":9706,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":22,"forks":3,"open_issues":22,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/108"},"html":{"href":"https://github.com/matrix-org/go-neb/pull/108"},"issue":{"href":"https://api.github.com/repos/matrix-org/go-neb/issues/108"},"comments":{"href":"https://api.github.com/repos/matrix-org/go-neb/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/go-neb/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/go-neb/statuses/81e1859cb450c88dacd6103193962eee09187edf"}}}}
{"actor":{"display_login":"Kegsay"}}