{"action":"created","issue":{"url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165","repository_url":"https://api.github.com/repos/browserstack/browserstack-runner","labels_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165/comments","events_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165/events","html_url":"https://github.com/browserstack/browserstack-runner/pull/165","id":168853150,"number":165,"title":"feature(module): Use browserstack-runner as module as well as cli","user":{"login":"vedharish","id":2497481,"avatar_url":"https://avatars.githubusercontent.com/u/2497481?v=3","gravatar_id":"","url":"https://api.github.com/users/vedharish","html_url":"https://github.com/vedharish","followers_url":"https://api.github.com/users/vedharish/followers","following_url":"https://api.github.com/users/vedharish/following{/other_user}","gists_url":"https://api.github.com/users/vedharish/gists{/gist_id}","starred_url":"https://api.github.com/users/vedharish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vedharish/subscriptions","organizations_url":"https://api.github.com/users/vedharish/orgs","repos_url":"https://api.github.com/users/vedharish/repos","events_url":"https://api.github.com/users/vedharish/events{/privacy}","received_events_url":"https://api.github.com/users/vedharish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-02T10:37:18Z","updated_at":"2016-08-10T20:41:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/browserstack/browserstack-runner/pulls/165","html_url":"https://github.com/browserstack/browserstack-runner/pull/165","diff_url":"https://github.com/browserstack/browserstack-runner/pull/165.diff","patch_url":"https://github.com/browserstack/browserstack-runner/pull/165.patch"},"body":"We had a support request to allow browserstack-runner to be used as a module so as to be able to `require('browserstack-runner')`. \r\n\r\n### Dependencies\r\n- [x] Test: Added basic scenarios for testing invalid config keys and test report.\r\n\r\nSample code to use this as module -\r\n\r\n```node\r\nvar browserstackRunner = require('browserstack-runner');\r\n\r\nvar config = require('./browserstack.json');\r\n\r\nbrowserstackRunner.run(config, function(error, report) {\r\n  if(error) {\r\n    console.log(\"Error:\" + error);\r\n    return;\r\n  }\r\n  console.log(JSON.stringify(report, null, 2));\r\n  console.log(\"Test Finished\");\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/comments/238996989","html_url":"https://github.com/browserstack/browserstack-runner/pull/165#issuecomment-238996989","issue_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165","id":238996989,"user":{"login":"flore77","id":11819686,"avatar_url":"https://avatars.githubusercontent.com/u/11819686?v=3","gravatar_id":"","url":"https://api.github.com/users/flore77","html_url":"https://github.com/flore77","followers_url":"https://api.github.com/users/flore77/followers","following_url":"https://api.github.com/users/flore77/following{/other_user}","gists_url":"https://api.github.com/users/flore77/gists{/gist_id}","starred_url":"https://api.github.com/users/flore77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flore77/subscriptions","organizations_url":"https://api.github.com/users/flore77/orgs","repos_url":"https://api.github.com/users/flore77/repos","events_url":"https://api.github.com/users/flore77/events{/privacy}","received_events_url":"https://api.github.com/users/flore77/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T20:41:06Z","updated_at":"2016-08-10T20:41:06Z","body":"I made the new release :tada: it is on npm"}}
{"actor":{"display_login":"flore77"}}