{"action":"created","comment":{"url":"https://api.github.com/repos/reportportal/client-javascript/pulls/comments/124820183","pull_request_review_id":47141872,"id":124820183,"diff_hunk":"@@ -11,89 +11,227 @@ Library used only for implementors of custom listeners for ReportPortal.\n \n ## Installation\n The latest version is available on npm:\n+```cmd\n+npm install reportportal-client\n+```\n+    \n+\n+\n+## Example\n \n-    npm install reportportal-client\n+```javascript\n+let RPClient = require('reportportal-client');\n \n+let rpClient = new RPClient({\n+    token: \"00000000-0000-0000-0000-000000000000\",\n+    endpoint: \"http://your-instance.com:8080/api/v1\",\n+    launch: \"LAUNCH_NAME\",\n+    project: \"PROJECT_NAME\"\n+});\n+\n+rpClient.checkConnect().then((responce) => {\n+    console.log('You have successfully connected to the server.');\n+    console.log(`You are using an account: ${responce.full_name}`);\n+}, (error) => {\n+    console.log('Error connection to server');\n+    console.dir(error);\n+});\n+```\n \n-## Usage\n+## Settings\n+When creating a client instance, you need to specify the following parameters:\n+\n+Parameter | Description\n+--------- | -----------\n+token     | user's token Report Portal from which you want to send requests. It can be found on the profile page of this user.\n+endpoint  | URL of your server. For example, if you visit the page at 'https://server:8080/ui', then endpoint will be equal to 'https://server:8080/api/v1'.\n+launch    | Name of lunch at creation.\n+project   | The name of the project in which the lunches will be created.\n+\n+## Api\n+Each method (except checkConnect) returns an object of a specific format:\n+```javascript\n+{\n+    tempId: '4ds43fs', // generated by the client id for further work with the created item\n+    promise: Promise // An object indicating the completion of an operation\n+}\n+```\n+The client works synchronously, so to send the following requests it is not necessary to wait for the end of previous ones.\n+\n+### checkConnect\n+ checkConnect - asynchronous method for verifying the correct connection of the client\n+```javascript\n+rpClient.checkConnect().then((responce) => {\n+    console.log('You have successfully connected to the server.');\n+    console.log(`You are using an account: ${responce.full_name}`);\n+}, (error) => {\n+    console.log('Error connection to server');\n+    console.dir(error);\n+});\n+```\n \n-Main classes are:\n+### startLaunch\n+startLaunch - starts a new launch, return temp id that you want to use for all items within this lunch.\n+```javascript\n+let launchObj = rpClient.startLaunch({\n+    name: \"Client test\",\n+    start_time: rpClient.helpers.now(),\n+    description: \"description of the launch\",\n+    tags: [\"tag1\", \"tag2\"]\n+});\n+console.log(launchObj.tempId);\n+```\n+The method takes one argument:\n+* launch data object:\n+\n+Parameter | Description\n+--------- | -----------\n+start_time | (optional) start time launch(unix time). Default: rpClient.helpers.now()\n+name      | (optional) lunch name. Default: parameter 'launch' specified when creating the client instance","path":"README.md","position":92,"original_position":92,"commit_id":"249e6139a65be99f3c2161b4d8558fb9ff3b278b","original_commit_id":"249e6139a65be99f3c2161b4d8558fb9ff3b278b","user":{"login":"ksuglotova","id":29129137,"avatar_url":"https://avatars0.githubusercontent.com/u/29129137?v=3","gravatar_id":"","url":"https://api.github.com/users/ksuglotova","html_url":"https://github.com/ksuglotova","followers_url":"https://api.github.com/users/ksuglotova/followers","following_url":"https://api.github.com/users/ksuglotova/following{/other_user}","gists_url":"https://api.github.com/users/ksuglotova/gists{/gist_id}","starred_url":"https://api.github.com/users/ksuglotova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksuglotova/subscriptions","organizations_url":"https://api.github.com/users/ksuglotova/orgs","repos_url":"https://api.github.com/users/ksuglotova/repos","events_url":"https://api.github.com/users/ksuglotova/events{/privacy}","received_events_url":"https://api.github.com/users/ksuglotova/received_events","type":"User","site_admin":false},"body":"launch","created_at":"2017-06-29T14:43:23Z","updated_at":"2017-06-29T14:52:49Z","html_url":"https://github.com/reportportal/client-javascript/pull/13#discussion_r124820183","pull_request_url":"https://api.github.com/repos/reportportal/client-javascript/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/comments/124820183"},"html":{"href":"https://github.com/reportportal/client-javascript/pull/13#discussion_r124820183"},"pull_request":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/reportportal/client-javascript/pulls/13","id":128164733,"html_url":"https://github.com/reportportal/client-javascript/pull/13","diff_url":"https://github.com/reportportal/client-javascript/pull/13.diff","patch_url":"https://github.com/reportportal/client-javascript/pull/13.patch","issue_url":"https://api.github.com/repos/reportportal/client-javascript/issues/13","number":13,"state":"open","locked":false,"title":"Made the client synchronous","user":{"login":"lexecon","id":1101915,"avatar_url":"https://avatars2.githubusercontent.com/u/1101915?v=3","gravatar_id":"","url":"https://api.github.com/users/lexecon","html_url":"https://github.com/lexecon","followers_url":"https://api.github.com/users/lexecon/followers","following_url":"https://api.github.com/users/lexecon/following{/other_user}","gists_url":"https://api.github.com/users/lexecon/gists{/gist_id}","starred_url":"https://api.github.com/users/lexecon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexecon/subscriptions","organizations_url":"https://api.github.com/users/lexecon/orgs","repos_url":"https://api.github.com/users/lexecon/repos","events_url":"https://api.github.com/users/lexecon/events{/privacy}","received_events_url":"https://api.github.com/users/lexecon/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-29T14:24:22Z","updated_at":"2017-06-29T14:52:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e551ce155090e5d8149ddb708722500b226cf02d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/reportportal/client-javascript/pulls/13/commits","review_comments_url":"https://api.github.com/repos/reportportal/client-javascript/pulls/13/comments","review_comment_url":"https://api.github.com/repos/reportportal/client-javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reportportal/client-javascript/issues/13/comments","statuses_url":"https://api.github.com/repos/reportportal/client-javascript/statuses/249e6139a65be99f3c2161b4d8558fb9ff3b278b","head":{"label":"lexecon:master","ref":"master","sha":"249e6139a65be99f3c2161b4d8558fb9ff3b278b","user":{"login":"lexecon","id":1101915,"avatar_url":"https://avatars2.githubusercontent.com/u/1101915?v=3","gravatar_id":"","url":"https://api.github.com/users/lexecon","html_url":"https://github.com/lexecon","followers_url":"https://api.github.com/users/lexecon/followers","following_url":"https://api.github.com/users/lexecon/following{/other_user}","gists_url":"https://api.github.com/users/lexecon/gists{/gist_id}","starred_url":"https://api.github.com/users/lexecon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexecon/subscriptions","organizations_url":"https://api.github.com/users/lexecon/orgs","repos_url":"https://api.github.com/users/lexecon/repos","events_url":"https://api.github.com/users/lexecon/events{/privacy}","received_events_url":"https://api.github.com/users/lexecon/received_events","type":"User","site_admin":false},"repo":{"id":95539483,"name":"client-javascript","full_name":"lexecon/client-javascript","owner":{"login":"lexecon","id":1101915,"avatar_url":"https://avatars2.githubusercontent.com/u/1101915?v=3","gravatar_id":"","url":"https://api.github.com/users/lexecon","html_url":"https://github.com/lexecon","followers_url":"https://api.github.com/users/lexecon/followers","following_url":"https://api.github.com/users/lexecon/following{/other_user}","gists_url":"https://api.github.com/users/lexecon/gists{/gist_id}","starred_url":"https://api.github.com/users/lexecon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexecon/subscriptions","organizations_url":"https://api.github.com/users/lexecon/orgs","repos_url":"https://api.github.com/users/lexecon/repos","events_url":"https://api.github.com/users/lexecon/events{/privacy}","received_events_url":"https://api.github.com/users/lexecon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lexecon/client-javascript","description":null,"fork":true,"url":"https://api.github.com/repos/lexecon/client-javascript","forks_url":"https://api.github.com/repos/lexecon/client-javascript/forks","keys_url":"https://api.github.com/repos/lexecon/client-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lexecon/client-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lexecon/client-javascript/teams","hooks_url":"https://api.github.com/repos/lexecon/client-javascript/hooks","issue_events_url":"https://api.github.com/repos/lexecon/client-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/lexecon/client-javascript/events","assignees_url":"https://api.github.com/repos/lexecon/client-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/lexecon/client-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/lexecon/client-javascript/tags","blobs_url":"https://api.github.com/repos/lexecon/client-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lexecon/client-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lexecon/client-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/lexecon/client-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lexecon/client-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/lexecon/client-javascript/languages","stargazers_url":"https://api.github.com/repos/lexecon/client-javascript/stargazers","contributors_url":"https://api.github.com/repos/lexecon/client-javascript/contributors","subscribers_url":"https://api.github.com/repos/lexecon/client-javascript/subscribers","subscription_url":"https://api.github.com/repos/lexecon/client-javascript/subscription","commits_url":"https://api.github.com/repos/lexecon/client-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/lexecon/client-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/lexecon/client-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/lexecon/client-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/lexecon/client-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/lexecon/client-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lexecon/client-javascript/merges","archive_url":"https://api.github.com/repos/lexecon/client-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lexecon/client-javascript/downloads","issues_url":"https://api.github.com/repos/lexecon/client-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/lexecon/client-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/lexecon/client-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/lexecon/client-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lexecon/client-javascript/labels{/name}","releases_url":"https://api.github.com/repos/lexecon/client-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/lexecon/client-javascript/deployments","created_at":"2017-06-27T09:08:01Z","updated_at":"2017-06-27T09:08:03Z","pushed_at":"2017-06-29T14:17:08Z","git_url":"git://github.com/lexecon/client-javascript.git","ssh_url":"git@github.com:lexecon/client-javascript.git","clone_url":"https://github.com/lexecon/client-javascript.git","svn_url":"https://github.com/lexecon/client-javascript","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"reportportal:master","ref":"master","sha":"38c78c1fe4b56ed428746176a28a63da53c5fc4a","user":{"login":"reportportal","id":17636279,"avatar_url":"https://avatars2.githubusercontent.com/u/17636279?v=3","gravatar_id":"","url":"https://api.github.com/users/reportportal","html_url":"https://github.com/reportportal","followers_url":"https://api.github.com/users/reportportal/followers","following_url":"https://api.github.com/users/reportportal/following{/other_user}","gists_url":"https://api.github.com/users/reportportal/gists{/gist_id}","starred_url":"https://api.github.com/users/reportportal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reportportal/subscriptions","organizations_url":"https://api.github.com/users/reportportal/orgs","repos_url":"https://api.github.com/users/reportportal/repos","events_url":"https://api.github.com/users/reportportal/events{/privacy}","received_events_url":"https://api.github.com/users/reportportal/received_events","type":"Organization","site_admin":false},"repo":{"id":72623470,"name":"client-javascript","full_name":"reportportal/client-javascript","owner":{"login":"reportportal","id":17636279,"avatar_url":"https://avatars2.githubusercontent.com/u/17636279?v=3","gravatar_id":"","url":"https://api.github.com/users/reportportal","html_url":"https://github.com/reportportal","followers_url":"https://api.github.com/users/reportportal/followers","following_url":"https://api.github.com/users/reportportal/following{/other_user}","gists_url":"https://api.github.com/users/reportportal/gists{/gist_id}","starred_url":"https://api.github.com/users/reportportal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reportportal/subscriptions","organizations_url":"https://api.github.com/users/reportportal/orgs","repos_url":"https://api.github.com/users/reportportal/repos","events_url":"https://api.github.com/users/reportportal/events{/privacy}","received_events_url":"https://api.github.com/users/reportportal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reportportal/client-javascript","description":null,"fork":false,"url":"https://api.github.com/repos/reportportal/client-javascript","forks_url":"https://api.github.com/repos/reportportal/client-javascript/forks","keys_url":"https://api.github.com/repos/reportportal/client-javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reportportal/client-javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reportportal/client-javascript/teams","hooks_url":"https://api.github.com/repos/reportportal/client-javascript/hooks","issue_events_url":"https://api.github.com/repos/reportportal/client-javascript/issues/events{/number}","events_url":"https://api.github.com/repos/reportportal/client-javascript/events","assignees_url":"https://api.github.com/repos/reportportal/client-javascript/assignees{/user}","branches_url":"https://api.github.com/repos/reportportal/client-javascript/branches{/branch}","tags_url":"https://api.github.com/repos/reportportal/client-javascript/tags","blobs_url":"https://api.github.com/repos/reportportal/client-javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reportportal/client-javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reportportal/client-javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/reportportal/client-javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reportportal/client-javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/reportportal/client-javascript/languages","stargazers_url":"https://api.github.com/repos/reportportal/client-javascript/stargazers","contributors_url":"https://api.github.com/repos/reportportal/client-javascript/contributors","subscribers_url":"https://api.github.com/repos/reportportal/client-javascript/subscribers","subscription_url":"https://api.github.com/repos/reportportal/client-javascript/subscription","commits_url":"https://api.github.com/repos/reportportal/client-javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/reportportal/client-javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/reportportal/client-javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/reportportal/client-javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/reportportal/client-javascript/contents/{+path}","compare_url":"https://api.github.com/repos/reportportal/client-javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reportportal/client-javascript/merges","archive_url":"https://api.github.com/repos/reportportal/client-javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reportportal/client-javascript/downloads","issues_url":"https://api.github.com/repos/reportportal/client-javascript/issues{/number}","pulls_url":"https://api.github.com/repos/reportportal/client-javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/reportportal/client-javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/reportportal/client-javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reportportal/client-javascript/labels{/name}","releases_url":"https://api.github.com/repos/reportportal/client-javascript/releases{/id}","deployments_url":"https://api.github.com/repos/reportportal/client-javascript/deployments","created_at":"2016-11-02T09:19:52Z","updated_at":"2017-05-25T22:03:41Z","pushed_at":"2017-06-29T14:24:22Z","git_url":"git://github.com/reportportal/client-javascript.git","ssh_url":"git@github.com:reportportal/client-javascript.git","clone_url":"https://github.com/reportportal/client-javascript.git","svn_url":"https://github.com/reportportal/client-javascript","homepage":null,"size":23,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/13"},"html":{"href":"https://github.com/reportportal/client-javascript/pull/13"},"issue":{"href":"https://api.github.com/repos/reportportal/client-javascript/issues/13"},"comments":{"href":"https://api.github.com/repos/reportportal/client-javascript/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reportportal/client-javascript/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/reportportal/client-javascript/statuses/249e6139a65be99f3c2161b4d8558fb9ff3b278b"}}}}
{"actor":{"display_login":"ksuglotova"}}