{"action":"created","comment":{"url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments/42797317","id":42797317,"diff_hunk":"@@ -1,11 +1,100 @@\n-(TODO: actual README content)\n+Node.js client for [FaunaDB](https://faunadb.com).\n \n-## Build\n+View documentation [here](https://faunadb.github.io/faunadb-js/).\n+\n+See the [FaunaDB Documentation](https://faunadb.com/documentation) for\n+a complete API reference, or look in\n+[`/tests`](https://github.com/faunadb/faunadb-python/tree/master/tests) for more\n+examples.\n+\n+## Using the Client\n+\n+### Install\n+\n+  npm install faunadb/faunadb-js\n+\n+### Use\n+\n+All work with FaunaDB happens through a Client instance.\n+All Client methods return [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n+Although it's possible to use Client alone, it's often easier to do work through Model classes.\n+For advanced work, the query api (`faunadb/lib/query`) will be useful.\n+\n+    import Client from 'faunadb/lib/client'\n+    import {NotFound} from 'faunadb/lib/errors'\n+    import Model from 'faunadb/lib/model/Model'\n+    import {Class, Database, Key} from 'faunadb/lib/model/Builtin'\n+    import {Ref} from 'faunadb/lib/objects'\n+    import * as query from 'faunadb/lib/query'\n+\n+    const rootClient = new Client({secret: {\n+      // Use your faunadb.com login here\n+      user: '',\n+      pass: ''\n+    }})\n+\n+    async function testPing() {\n+      console.log(await rootClient.ping())\n+    }\n+\n+    async function createDBAndGetClient() {\n+      const dbName = 'prydain'\n+      const dbRef = new Ref('databases', 'prydain')\n+\n+      try {\n+        await rootClient.delete(dbRef)","path":"README.md","position":47,"original_position":47,"commit_id":"7d00c140ea511118644b9c080f943a0757c279b6","original_commit_id":"7d00c140ea511118644b9c080f943a0757c279b6","user":{"login":"eaceaser","id":157866,"avatar_url":"https://avatars.githubusercontent.com/u/157866?v=3","gravatar_id":"","url":"https://api.github.com/users/eaceaser","html_url":"https://github.com/eaceaser","followers_url":"https://api.github.com/users/eaceaser/followers","following_url":"https://api.github.com/users/eaceaser/following{/other_user}","gists_url":"https://api.github.com/users/eaceaser/gists{/gist_id}","starred_url":"https://api.github.com/users/eaceaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaceaser/subscriptions","organizations_url":"https://api.github.com/users/eaceaser/orgs","repos_url":"https://api.github.com/users/eaceaser/repos","events_url":"https://api.github.com/users/eaceaser/events{/privacy}","received_events_url":"https://api.github.com/users/eaceaser/received_events","type":"User","site_admin":false},"body":"I don't think the example should use async/await. Most users will not have access to these constructs.","created_at":"2015-10-22T19:53:08Z","updated_at":"2015-10-22T19:53:08Z","html_url":"https://github.com/faunadb/faunadb-js/pull/9#discussion_r42797317","pull_request_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments/42797317"},"html":{"href":"https://github.com/faunadb/faunadb-js/pull/9#discussion_r42797317"},"pull_request":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9","id":48395131,"html_url":"https://github.com/faunadb/faunadb-js/pull/9","diff_url":"https://github.com/faunadb/faunadb-js/pull/9.diff","patch_url":"https://github.com/faunadb/faunadb-js/pull/9.patch","issue_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/9","number":9,"state":"open","locked":false,"title":"Write README","user":{"login":"andy-faunadb","id":13004842,"avatar_url":"https://avatars.githubusercontent.com/u/13004842?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-faunadb","html_url":"https://github.com/andy-faunadb","followers_url":"https://api.github.com/users/andy-faunadb/followers","following_url":"https://api.github.com/users/andy-faunadb/following{/other_user}","gists_url":"https://api.github.com/users/andy-faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-faunadb/subscriptions","organizations_url":"https://api.github.com/users/andy-faunadb/orgs","repos_url":"https://api.github.com/users/andy-faunadb/repos","events_url":"https://api.github.com/users/andy-faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/andy-faunadb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-21T22:12:38Z","updated_at":"2015-10-22T19:53:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bbfdcf0e13a30d59d73ce4f178e749eb15b1a95","assignee":{"login":"eaceaser","id":157866,"avatar_url":"https://avatars.githubusercontent.com/u/157866?v=3","gravatar_id":"","url":"https://api.github.com/users/eaceaser","html_url":"https://github.com/eaceaser","followers_url":"https://api.github.com/users/eaceaser/followers","following_url":"https://api.github.com/users/eaceaser/following{/other_user}","gists_url":"https://api.github.com/users/eaceaser/gists{/gist_id}","starred_url":"https://api.github.com/users/eaceaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaceaser/subscriptions","organizations_url":"https://api.github.com/users/eaceaser/orgs","repos_url":"https://api.github.com/users/eaceaser/repos","events_url":"https://api.github.com/users/eaceaser/events{/privacy}","received_events_url":"https://api.github.com/users/eaceaser/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9/commits","review_comments_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9/comments","review_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/9/comments","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/7d00c140ea511118644b9c080f943a0757c279b6","head":{"label":"faunadb:readme","ref":"readme","sha":"7d00c140ea511118644b9c080f943a0757c279b6","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":43472750,"name":"faunadb-js","full_name":"faunadb/faunadb-js","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-js","description":"Node.js client for FaunaDB","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-js","forks_url":"https://api.github.com/repos/faunadb/faunadb-js/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-js/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-js/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-js/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-js/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-js/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-js/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-js/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-js/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-js/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-js/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-js/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-js/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-js/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-js/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-js/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-js/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-js/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-js/releases{/id}","created_at":"2015-10-01T01:36:40Z","updated_at":"2015-10-05T21:32:03Z","pushed_at":"2015-10-21T22:32:38Z","git_url":"git://github.com/faunadb/faunadb-js.git","ssh_url":"git@github.com:faunadb/faunadb-js.git","clone_url":"https://github.com/faunadb/faunadb-js.git","svn_url":"https://github.com/faunadb/faunadb-js","homepage":null,"size":1043,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"faunadb:master","ref":"master","sha":"547206f0288c6825286d16bc3bc76eb6a1c41c8c","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":43472750,"name":"faunadb-js","full_name":"faunadb/faunadb-js","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-js","description":"Node.js client for FaunaDB","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-js","forks_url":"https://api.github.com/repos/faunadb/faunadb-js/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-js/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-js/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-js/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-js/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-js/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-js/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-js/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-js/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-js/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-js/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-js/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-js/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-js/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-js/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-js/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-js/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-js/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-js/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-js/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-js/releases{/id}","created_at":"2015-10-01T01:36:40Z","updated_at":"2015-10-05T21:32:03Z","pushed_at":"2015-10-21T22:32:38Z","git_url":"git://github.com/faunadb/faunadb-js.git","ssh_url":"git@github.com:faunadb/faunadb-js.git","clone_url":"https://github.com/faunadb/faunadb-js.git","svn_url":"https://github.com/faunadb/faunadb-js","homepage":null,"size":1043,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9"},"html":{"href":"https://github.com/faunadb/faunadb-js/pull/9"},"issue":{"href":"https://api.github.com/repos/faunadb/faunadb-js/issues/9"},"comments":{"href":"https://api.github.com/repos/faunadb/faunadb-js/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faunadb/faunadb-js/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/faunadb/faunadb-js/statuses/7d00c140ea511118644b9c080f943a0757c279b6"}}}}