{"action":"created","comment":{"url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/comments/91768206","pull_request_review_id":12280606,"id":91768206,"diff_hunk":"@@ -1,183 +1,220 @@\n # Vendasta Node SDK\n \n-## Installation ##\n-\n+## Installation\n ```\n npm install --save vendasta-sdk\n ```\n \n-## Usage ##\n-Note: The authentication mechanism is likely to change. Currently, it's done via a static oauth token (ask us for one).\n-The SDK has 3 environments available. Test is intended for Vendasta development. Demo is intended for partners to test their integration against, and Production is the end customer facing environment.\n-Better documentation is coming later, for now this readme can serve as a quick start guide.\n-\n-\n-### Creating a Client ###\n+## Usage\n+Note: The authentication mechanism is likely to change.\n+Currently, it's done via a static oauth token (ask us for one).\n+The SDK has 3 environments available.\n+Test is intended for Vendasta development.\n+Demo is intended for partners to test their integration against, and Production is the end customer facing environment.\n \n+### Creating a Client\n You'll use the client to interact with either our demo or production servers.\n-Creating the client is easy\n+Create the client with the appropriate environment:\n+- *Environment.DEMO*\n+- *Environment.PRODUCTION*\n \n-#### Typescript ####\n+Creating the client is easy:\n+\n+#### Typescript\n ``` typescript\n import {Client, Environment} from \"vendasta-sdk/src/index\"\n client: Client = new Client(Environment.DEMO, \"my-access-token\");\n ```\n \n-#### Javascript ####\n+#### Javascript\n ``` javascript\n var vendastaSdk = require(\"vendasta-sdk\");\n var client = new vendastaSdk.Client(vendastaSdk.Environment.DEMO, \"my-access-token\");\n ```\n \n+### Saving a Listing\n+``` typescript\n+client.putListing(listing, callback);\n+```\n+\n+This will either save a new listing, or update the existing one with the given `listingId`, or `externalId`.","path":"README.md","position":52,"original_position":52,"commit_id":"09641c7ab25c373d8af6aedd2d7f0d01282a2dc2","original_commit_id":"09641c7ab25c373d8af6aedd2d7f0d01282a2dc2","user":{"login":"mbullock-va","id":12516585,"avatar_url":"https://avatars.githubusercontent.com/u/12516585?v=3","gravatar_id":"","url":"https://api.github.com/users/mbullock-va","html_url":"https://github.com/mbullock-va","followers_url":"https://api.github.com/users/mbullock-va/followers","following_url":"https://api.github.com/users/mbullock-va/following{/other_user}","gists_url":"https://api.github.com/users/mbullock-va/gists{/gist_id}","starred_url":"https://api.github.com/users/mbullock-va/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbullock-va/subscriptions","organizations_url":"https://api.github.com/users/mbullock-va/orgs","repos_url":"https://api.github.com/users/mbullock-va/repos","events_url":"https://api.github.com/users/mbullock-va/events{/privacy}","received_events_url":"https://api.github.com/users/mbullock-va/received_events","type":"User","site_admin":false},"body":"`listing_id` and `external_id`","created_at":"2016-12-09T18:27:20Z","updated_at":"2016-12-09T18:27:20Z","html_url":"https://github.com/vendasta/vendasta-node-sdk/pull/9#discussion_r91768206","pull_request_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/comments/91768206"},"html":{"href":"https://github.com/vendasta/vendasta-node-sdk/pull/9#discussion_r91768206"},"pull_request":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9","id":97340113,"html_url":"https://github.com/vendasta/vendasta-node-sdk/pull/9","diff_url":"https://github.com/vendasta/vendasta-node-sdk/pull/9.diff","patch_url":"https://github.com/vendasta/vendasta-node-sdk/pull/9.patch","issue_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/9","number":9,"state":"open","locked":false,"title":"Fix example code in readme.","user":{"login":"etarasoff-va","id":9092193,"avatar_url":"https://avatars.githubusercontent.com/u/9092193?v=3","gravatar_id":"","url":"https://api.github.com/users/etarasoff-va","html_url":"https://github.com/etarasoff-va","followers_url":"https://api.github.com/users/etarasoff-va/followers","following_url":"https://api.github.com/users/etarasoff-va/following{/other_user}","gists_url":"https://api.github.com/users/etarasoff-va/gists{/gist_id}","starred_url":"https://api.github.com/users/etarasoff-va/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etarasoff-va/subscriptions","organizations_url":"https://api.github.com/users/etarasoff-va/orgs","repos_url":"https://api.github.com/users/etarasoff-va/repos","events_url":"https://api.github.com/users/etarasoff-va/events{/privacy}","received_events_url":"https://api.github.com/users/etarasoff-va/received_events","type":"User","site_admin":false},"body":"Fix example code, minor typos.","created_at":"2016-12-09T16:39:33Z","updated_at":"2016-12-09T18:27:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8eaf35ba2872c09b218ebda7e0ca2da2313e4712","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9/commits","review_comments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9/comments","review_comment_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/9/comments","statuses_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/statuses/09641c7ab25c373d8af6aedd2d7f0d01282a2dc2","head":{"label":"vendasta:update-readme","ref":"update-readme","sha":"09641c7ab25c373d8af6aedd2d7f0d01282a2dc2","user":{"login":"vendasta","id":1919064,"avatar_url":"https://avatars.githubusercontent.com/u/1919064?v=3","gravatar_id":"","url":"https://api.github.com/users/vendasta","html_url":"https://github.com/vendasta","followers_url":"https://api.github.com/users/vendasta/followers","following_url":"https://api.github.com/users/vendasta/following{/other_user}","gists_url":"https://api.github.com/users/vendasta/gists{/gist_id}","starred_url":"https://api.github.com/users/vendasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendasta/subscriptions","organizations_url":"https://api.github.com/users/vendasta/orgs","repos_url":"https://api.github.com/users/vendasta/repos","events_url":"https://api.github.com/users/vendasta/events{/privacy}","received_events_url":"https://api.github.com/users/vendasta/received_events","type":"Organization","site_admin":false},"repo":{"id":62155705,"name":"vendasta-node-sdk","full_name":"vendasta/vendasta-node-sdk","owner":{"login":"vendasta","id":1919064,"avatar_url":"https://avatars.githubusercontent.com/u/1919064?v=3","gravatar_id":"","url":"https://api.github.com/users/vendasta","html_url":"https://github.com/vendasta","followers_url":"https://api.github.com/users/vendasta/followers","following_url":"https://api.github.com/users/vendasta/following{/other_user}","gists_url":"https://api.github.com/users/vendasta/gists{/gist_id}","starred_url":"https://api.github.com/users/vendasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendasta/subscriptions","organizations_url":"https://api.github.com/users/vendasta/orgs","repos_url":"https://api.github.com/users/vendasta/repos","events_url":"https://api.github.com/users/vendasta/events{/privacy}","received_events_url":"https://api.github.com/users/vendasta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vendasta/vendasta-node-sdk","description":"Vendasta Node SDK","fork":false,"url":"https://api.github.com/repos/vendasta/vendasta-node-sdk","forks_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/forks","keys_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/teams","hooks_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/events","assignees_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/tags","blobs_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/languages","stargazers_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/subscription","commits_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/merges","archive_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/downloads","issues_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/deployments","created_at":"2016-06-28T16:08:43Z","updated_at":"2016-11-18T16:18:10Z","pushed_at":"2016-12-09T17:50:35Z","git_url":"git://github.com/vendasta/vendasta-node-sdk.git","ssh_url":"git@github.com:vendasta/vendasta-node-sdk.git","clone_url":"https://github.com/vendasta/vendasta-node-sdk.git","svn_url":"https://github.com/vendasta/vendasta-node-sdk","homepage":"","size":565,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"vendasta:master","ref":"master","sha":"61136094041807dc091f03cee707587e1a69e36f","user":{"login":"vendasta","id":1919064,"avatar_url":"https://avatars.githubusercontent.com/u/1919064?v=3","gravatar_id":"","url":"https://api.github.com/users/vendasta","html_url":"https://github.com/vendasta","followers_url":"https://api.github.com/users/vendasta/followers","following_url":"https://api.github.com/users/vendasta/following{/other_user}","gists_url":"https://api.github.com/users/vendasta/gists{/gist_id}","starred_url":"https://api.github.com/users/vendasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendasta/subscriptions","organizations_url":"https://api.github.com/users/vendasta/orgs","repos_url":"https://api.github.com/users/vendasta/repos","events_url":"https://api.github.com/users/vendasta/events{/privacy}","received_events_url":"https://api.github.com/users/vendasta/received_events","type":"Organization","site_admin":false},"repo":{"id":62155705,"name":"vendasta-node-sdk","full_name":"vendasta/vendasta-node-sdk","owner":{"login":"vendasta","id":1919064,"avatar_url":"https://avatars.githubusercontent.com/u/1919064?v=3","gravatar_id":"","url":"https://api.github.com/users/vendasta","html_url":"https://github.com/vendasta","followers_url":"https://api.github.com/users/vendasta/followers","following_url":"https://api.github.com/users/vendasta/following{/other_user}","gists_url":"https://api.github.com/users/vendasta/gists{/gist_id}","starred_url":"https://api.github.com/users/vendasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vendasta/subscriptions","organizations_url":"https://api.github.com/users/vendasta/orgs","repos_url":"https://api.github.com/users/vendasta/repos","events_url":"https://api.github.com/users/vendasta/events{/privacy}","received_events_url":"https://api.github.com/users/vendasta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vendasta/vendasta-node-sdk","description":"Vendasta Node SDK","fork":false,"url":"https://api.github.com/repos/vendasta/vendasta-node-sdk","forks_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/forks","keys_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/teams","hooks_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/hooks","issue_events_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/events","assignees_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/tags","blobs_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/languages","stargazers_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/stargazers","contributors_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/contributors","subscribers_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/subscribers","subscription_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/subscription","commits_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/merges","archive_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/downloads","issues_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/labels{/name}","releases_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/vendasta/vendasta-node-sdk/deployments","created_at":"2016-06-28T16:08:43Z","updated_at":"2016-11-18T16:18:10Z","pushed_at":"2016-12-09T17:50:35Z","git_url":"git://github.com/vendasta/vendasta-node-sdk.git","ssh_url":"git@github.com:vendasta/vendasta-node-sdk.git","clone_url":"https://github.com/vendasta/vendasta-node-sdk.git","svn_url":"https://github.com/vendasta/vendasta-node-sdk","homepage":"","size":565,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9"},"html":{"href":"https://github.com/vendasta/vendasta-node-sdk/pull/9"},"issue":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/9"},"comments":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/vendasta/vendasta-node-sdk/statuses/09641c7ab25c373d8af6aedd2d7f0d01282a2dc2"}}}}
{"actor":{"display_login":"mbullock-va"}}