{"action":"opened","number":97,"pull_request":{"url":"https://api.github.com/repos/agsh/onvif/pulls/97","id":181117807,"html_url":"https://github.com/agsh/onvif/pull/97","diff_url":"https://github.com/agsh/onvif/pull/97.diff","patch_url":"https://github.com/agsh/onvif/pull/97.patch","issue_url":"https://api.github.com/repos/agsh/onvif/issues/97","number":97,"state":"open","locked":false,"title":"Removes cylic dependencies so it can be used in React Native","user":{"login":"lucaszanella","id":6632321,"avatar_url":"https://avatars1.githubusercontent.com/u/6632321?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaszanella","html_url":"https://github.com/lucaszanella","followers_url":"https://api.github.com/users/lucaszanella/followers","following_url":"https://api.github.com/users/lucaszanella/following{/other_user}","gists_url":"https://api.github.com/users/lucaszanella/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaszanella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaszanella/subscriptions","organizations_url":"https://api.github.com/users/lucaszanella/orgs","repos_url":"https://api.github.com/users/lucaszanella/repos","events_url":"https://api.github.com/users/lucaszanella/events{/privacy}","received_events_url":"https://api.github.com/users/lucaszanella/received_events","type":"User","site_admin":false},"body":"I had a [hard time figuring out](https://stackoverflow.com/questions/49398078/porting-nodejs-module-to-react-native-object-prototype-undefined) why this module didn't work on react native even though I mapped nodejs's `net` and `stream` libraries to React Native compatible ones. Turns out it was a problem with cyclic dependencies in the way you splits class definition in the library. \r\n\r\nThe best method I could find was to pass the already half built class object in the moment I require a new one, like this: \r\n\r\n```\r\nCam = function() {\r\n...\r\n}\r\n\r\nrequire('./devices')(Cam)\r\nrequire('./media')(Cam)\r\n...\r\n```\r\n\r\nI didn't touch any other part of the code but the diffs are kinda wrong.\r\n\r\nIt's kinda ugly but it's necessary. Don't know if this is going to serve you but would be nice to have it working in both nodejs and react native. And I'm also going to build a good onvif app with it, because the ones in play store and app store don't fit my need.","created_at":"2018-04-12T07:53:30Z","updated_at":"2018-04-12T07:53:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/agsh/onvif/pulls/97/commits","review_comments_url":"https://api.github.com/repos/agsh/onvif/pulls/97/comments","review_comment_url":"https://api.github.com/repos/agsh/onvif/pulls/comments{/number}","comments_url":"https://api.github.com/repos/agsh/onvif/issues/97/comments","statuses_url":"https://api.github.com/repos/agsh/onvif/statuses/67238a64e0a7a727337c1724f64a8a8817cf6dde","head":{"label":"lucaszanella:master","ref":"master","sha":"67238a64e0a7a727337c1724f64a8a8817cf6dde","user":{"login":"lucaszanella","id":6632321,"avatar_url":"https://avatars1.githubusercontent.com/u/6632321?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaszanella","html_url":"https://github.com/lucaszanella","followers_url":"https://api.github.com/users/lucaszanella/followers","following_url":"https://api.github.com/users/lucaszanella/following{/other_user}","gists_url":"https://api.github.com/users/lucaszanella/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaszanella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaszanella/subscriptions","organizations_url":"https://api.github.com/users/lucaszanella/orgs","repos_url":"https://api.github.com/users/lucaszanella/repos","events_url":"https://api.github.com/users/lucaszanella/events{/privacy}","received_events_url":"https://api.github.com/users/lucaszanella/received_events","type":"User","site_admin":false},"repo":{"id":101585887,"name":"onvif","full_name":"lucaszanella/onvif","owner":{"login":"lucaszanella","id":6632321,"avatar_url":"https://avatars1.githubusercontent.com/u/6632321?v=4","gravatar_id":"","url":"https://api.github.com/users/lucaszanella","html_url":"https://github.com/lucaszanella","followers_url":"https://api.github.com/users/lucaszanella/followers","following_url":"https://api.github.com/users/lucaszanella/following{/other_user}","gists_url":"https://api.github.com/users/lucaszanella/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaszanella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaszanella/subscriptions","organizations_url":"https://api.github.com/users/lucaszanella/orgs","repos_url":"https://api.github.com/users/lucaszanella/repos","events_url":"https://api.github.com/users/lucaszanella/events{/privacy}","received_events_url":"https://api.github.com/users/lucaszanella/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucaszanella/onvif","description":"ONVIF node.js implementation","fork":true,"url":"https://api.github.com/repos/lucaszanella/onvif","forks_url":"https://api.github.com/repos/lucaszanella/onvif/forks","keys_url":"https://api.github.com/repos/lucaszanella/onvif/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucaszanella/onvif/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucaszanella/onvif/teams","hooks_url":"https://api.github.com/repos/lucaszanella/onvif/hooks","issue_events_url":"https://api.github.com/repos/lucaszanella/onvif/issues/events{/number}","events_url":"https://api.github.com/repos/lucaszanella/onvif/events","assignees_url":"https://api.github.com/repos/lucaszanella/onvif/assignees{/user}","branches_url":"https://api.github.com/repos/lucaszanella/onvif/branches{/branch}","tags_url":"https://api.github.com/repos/lucaszanella/onvif/tags","blobs_url":"https://api.github.com/repos/lucaszanella/onvif/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucaszanella/onvif/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucaszanella/onvif/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucaszanella/onvif/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucaszanella/onvif/statuses/{sha}","languages_url":"https://api.github.com/repos/lucaszanella/onvif/languages","stargazers_url":"https://api.github.com/repos/lucaszanella/onvif/stargazers","contributors_url":"https://api.github.com/repos/lucaszanella/onvif/contributors","subscribers_url":"https://api.github.com/repos/lucaszanella/onvif/subscribers","subscription_url":"https://api.github.com/repos/lucaszanella/onvif/subscription","commits_url":"https://api.github.com/repos/lucaszanella/onvif/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucaszanella/onvif/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucaszanella/onvif/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucaszanella/onvif/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucaszanella/onvif/contents/{+path}","compare_url":"https://api.github.com/repos/lucaszanella/onvif/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucaszanella/onvif/merges","archive_url":"https://api.github.com/repos/lucaszanella/onvif/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucaszanella/onvif/downloads","issues_url":"https://api.github.com/repos/lucaszanella/onvif/issues{/number}","pulls_url":"https://api.github.com/repos/lucaszanella/onvif/pulls{/number}","milestones_url":"https://api.github.com/repos/lucaszanella/onvif/milestones{/number}","notifications_url":"https://api.github.com/repos/lucaszanella/onvif/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucaszanella/onvif/labels{/name}","releases_url":"https://api.github.com/repos/lucaszanella/onvif/releases{/id}","deployments_url":"https://api.github.com/repos/lucaszanella/onvif/deployments","created_at":"2017-08-27T23:12:05Z","updated_at":"2018-04-11T03:26:22Z","pushed_at":"2018-04-11T03:26:21Z","git_url":"git://github.com/lucaszanella/onvif.git","ssh_url":"git@github.com:lucaszanella/onvif.git","clone_url":"https://github.com/lucaszanella/onvif.git","svn_url":"https://github.com/lucaszanella/onvif","homepage":"http://agsh.github.io/onvif/","size":966,"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,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"agsh:master","ref":"master","sha":"5d940b56df23f277382a08e61a6bccf6c65cbab1","user":{"login":"agsh","id":576263,"avatar_url":"https://avatars1.githubusercontent.com/u/576263?v=4","gravatar_id":"","url":"https://api.github.com/users/agsh","html_url":"https://github.com/agsh","followers_url":"https://api.github.com/users/agsh/followers","following_url":"https://api.github.com/users/agsh/following{/other_user}","gists_url":"https://api.github.com/users/agsh/gists{/gist_id}","starred_url":"https://api.github.com/users/agsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agsh/subscriptions","organizations_url":"https://api.github.com/users/agsh/orgs","repos_url":"https://api.github.com/users/agsh/repos","events_url":"https://api.github.com/users/agsh/events{/privacy}","received_events_url":"https://api.github.com/users/agsh/received_events","type":"User","site_admin":false},"repo":{"id":27709869,"name":"onvif","full_name":"agsh/onvif","owner":{"login":"agsh","id":576263,"avatar_url":"https://avatars1.githubusercontent.com/u/576263?v=4","gravatar_id":"","url":"https://api.github.com/users/agsh","html_url":"https://github.com/agsh","followers_url":"https://api.github.com/users/agsh/followers","following_url":"https://api.github.com/users/agsh/following{/other_user}","gists_url":"https://api.github.com/users/agsh/gists{/gist_id}","starred_url":"https://api.github.com/users/agsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agsh/subscriptions","organizations_url":"https://api.github.com/users/agsh/orgs","repos_url":"https://api.github.com/users/agsh/repos","events_url":"https://api.github.com/users/agsh/events{/privacy}","received_events_url":"https://api.github.com/users/agsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/agsh/onvif","description":"ONVIF node.js implementation","fork":false,"url":"https://api.github.com/repos/agsh/onvif","forks_url":"https://api.github.com/repos/agsh/onvif/forks","keys_url":"https://api.github.com/repos/agsh/onvif/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agsh/onvif/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agsh/onvif/teams","hooks_url":"https://api.github.com/repos/agsh/onvif/hooks","issue_events_url":"https://api.github.com/repos/agsh/onvif/issues/events{/number}","events_url":"https://api.github.com/repos/agsh/onvif/events","assignees_url":"https://api.github.com/repos/agsh/onvif/assignees{/user}","branches_url":"https://api.github.com/repos/agsh/onvif/branches{/branch}","tags_url":"https://api.github.com/repos/agsh/onvif/tags","blobs_url":"https://api.github.com/repos/agsh/onvif/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agsh/onvif/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agsh/onvif/git/refs{/sha}","trees_url":"https://api.github.com/repos/agsh/onvif/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agsh/onvif/statuses/{sha}","languages_url":"https://api.github.com/repos/agsh/onvif/languages","stargazers_url":"https://api.github.com/repos/agsh/onvif/stargazers","contributors_url":"https://api.github.com/repos/agsh/onvif/contributors","subscribers_url":"https://api.github.com/repos/agsh/onvif/subscribers","subscription_url":"https://api.github.com/repos/agsh/onvif/subscription","commits_url":"https://api.github.com/repos/agsh/onvif/commits{/sha}","git_commits_url":"https://api.github.com/repos/agsh/onvif/git/commits{/sha}","comments_url":"https://api.github.com/repos/agsh/onvif/comments{/number}","issue_comment_url":"https://api.github.com/repos/agsh/onvif/issues/comments{/number}","contents_url":"https://api.github.com/repos/agsh/onvif/contents/{+path}","compare_url":"https://api.github.com/repos/agsh/onvif/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agsh/onvif/merges","archive_url":"https://api.github.com/repos/agsh/onvif/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agsh/onvif/downloads","issues_url":"https://api.github.com/repos/agsh/onvif/issues{/number}","pulls_url":"https://api.github.com/repos/agsh/onvif/pulls{/number}","milestones_url":"https://api.github.com/repos/agsh/onvif/milestones{/number}","notifications_url":"https://api.github.com/repos/agsh/onvif/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agsh/onvif/labels{/name}","releases_url":"https://api.github.com/repos/agsh/onvif/releases{/id}","deployments_url":"https://api.github.com/repos/agsh/onvif/deployments","created_at":"2014-12-08T10:35:09Z","updated_at":"2018-04-12T00:50:34Z","pushed_at":"2018-04-10T08:45:25Z","git_url":"git://github.com/agsh/onvif.git","ssh_url":"git@github.com:agsh/onvif.git","clone_url":"https://github.com/agsh/onvif.git","svn_url":"https://github.com/agsh/onvif","homepage":"http://agsh.github.io/onvif/","size":958,"stargazers_count":204,"watchers_count":204,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":89,"open_issues":26,"watchers":204,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/agsh/onvif/pulls/97"},"html":{"href":"https://github.com/agsh/onvif/pull/97"},"issue":{"href":"https://api.github.com/repos/agsh/onvif/issues/97"},"comments":{"href":"https://api.github.com/repos/agsh/onvif/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/agsh/onvif/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/agsh/onvif/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/agsh/onvif/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/agsh/onvif/statuses/67238a64e0a7a727337c1724f64a8a8817cf6dde"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1900,"deletions":1900,"changed_files":9}}
{"actor":{"display_login":"lucaszanella"}}