{"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":16,"created_at":"2016-08-02T10:37:18Z","updated_at":"2016-08-16T14:01:28Z","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/240110740","html_url":"https://github.com/browserstack/browserstack-runner/pull/165#issuecomment-240110740","issue_url":"https://api.github.com/repos/browserstack/browserstack-runner/issues/165","id":240110740,"user":{"login":"jzaefferer","id":52585,"avatar_url":"https://avatars.githubusercontent.com/u/52585?v=3","gravatar_id":"","url":"https://api.github.com/users/jzaefferer","html_url":"https://github.com/jzaefferer","followers_url":"https://api.github.com/users/jzaefferer/followers","following_url":"https://api.github.com/users/jzaefferer/following{/other_user}","gists_url":"https://api.github.com/users/jzaefferer/gists{/gist_id}","starred_url":"https://api.github.com/users/jzaefferer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzaefferer/subscriptions","organizations_url":"https://api.github.com/users/jzaefferer/orgs","repos_url":"https://api.github.com/users/jzaefferer/repos","events_url":"https://api.github.com/users/jzaefferer/events{/privacy}","received_events_url":"https://api.github.com/users/jzaefferer/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T14:01:28Z","updated_at":"2016-08-16T14:01:28Z","body":"Looks good to me."}}
{"actor":{"display_login":"jzaefferer"}}