{"action":"created","comment":{"url":"https://api.github.com/repos/kivy/plyer/pulls/comments/74155011","id":74155011,"diff_hunk":"@@ -0,0 +1,102 @@\n+'''\n+ios Sysinfo\n+-----------\n+'''\n+\n+from plyer.facades import Sysinfo\n+from pyobjus import autoclass\n+from pyobjus.dylib_manager import load_dylib, make_dylib\n+import sys\n+load_framework('/System/Library/Frameworks/UIKit.framework')\n+make_dylib('plyer/platforms/ios/libs/sysinfo.m', frameworks=['Foundation'],\n+           out='sysinfo.dylib')\n+load_dylib('sysinfo.dylib')\n+UIDevice = autoclass('UIDevice')\n+UIScreen = autoclass('UIScreen')\n+NSProcessInfo = autoclass('NSProcessInfo')\n+\n+\n+class IosSysinfo(Sysinfo):\n+\n+    def __init__(self, **kwargs):\n+        super(IosSysinfo, self).__init__(**kwargs)\n+        self.device = UIDevice.currentDevice()\n+\n+    def _model_info(self):\n+        '''\n+        Returns the model info for example:\n+        '''\n+        return self.device.model\n+\n+    def _system_name(self):\n+        '''\n+        Returns the system's OS name for example:\n+        '''\n+        return self.device.systemName\n+\n+    def _platform_info(self):\n+        '''\n+        Returns platform's name for example:\n+        '''\n+        return sys.platform\n+\n+    def _processor_info(self):\n+        '''\n+        Returns the type of processor for example:\n+        '''\n+        return \" \"\n+\n+    def _version_info(self):\n+        '''\n+        Returns the version of OS in a tuple for example:\n+        '''\n+        return (self.device.systemVersion, \" \", \" \")\n+\n+    def _architecture_info(self):\n+        '''\n+        Returns the architecture in a tuple for example:\n+        '''\n+        sizeClass = autoclass('SizeClass')\n+        instance = sizeClass.alloc().init()\n+        bit = instance.get_bit_size()\n+        return (\"{}\".format(bit), \" \")\n+\n+    def _device_name(self):\n+        '''\n+        Returns the device name for example:\n+        '''\n+        return self.device.name\n+\n+    def _manufacturer_name(self):\n+        '''\n+        Returns the manufacturer's name for example:\n+        '''\n+        return \"Apple Inc.\"\n+\n+    def _kernel_version(self):\n+        '''\n+        Returns the kernel version for example:\n+        '''\n+        processinfo = NSProcessInfo()\n+        return processinfo.operatingSystemVersionString\n+\n+    def _storage_info(self):\n+        '''\n+        Returns the amount of storage (RAM) in GB. for example:\n+        '''\n+        Storage = autoclass('StorageClass')\n+        instance = Storage.alloc().init()","path":"plyer/platforms/ios/sysinfo.py","position":88,"original_position":88,"commit_id":"fad0e156420605b316d7aead361184d62b97315d","original_commit_id":"fad0e156420605b316d7aead361184d62b97315d","user":{"login":"kiok46","id":7335120,"avatar_url":"https://avatars.githubusercontent.com/u/7335120?v=3","gravatar_id":"","url":"https://api.github.com/users/kiok46","html_url":"https://github.com/kiok46","followers_url":"https://api.github.com/users/kiok46/followers","following_url":"https://api.github.com/users/kiok46/following{/other_user}","gists_url":"https://api.github.com/users/kiok46/gists{/gist_id}","starred_url":"https://api.github.com/users/kiok46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiok46/subscriptions","organizations_url":"https://api.github.com/users/kiok46/orgs","repos_url":"https://api.github.com/users/kiok46/repos","events_url":"https://api.github.com/users/kiok46/events{/privacy}","received_events_url":"https://api.github.com/users/kiok46/received_events","type":"User","site_admin":false},"body":"Same as under `_architecture_info` method.","created_at":"2016-08-09T22:15:35Z","updated_at":"2016-08-09T22:15:35Z","html_url":"https://github.com/kivy/plyer/pull/201#discussion_r74155011","pull_request_url":"https://api.github.com/repos/kivy/plyer/pulls/201","_links":{"self":{"href":"https://api.github.com/repos/kivy/plyer/pulls/comments/74155011"},"html":{"href":"https://github.com/kivy/plyer/pull/201#discussion_r74155011"},"pull_request":{"href":"https://api.github.com/repos/kivy/plyer/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/kivy/plyer/pulls/201","id":68476097,"html_url":"https://github.com/kivy/plyer/pull/201","diff_url":"https://github.com/kivy/plyer/pull/201.diff","patch_url":"https://github.com/kivy/plyer/pull/201.patch","issue_url":"https://api.github.com/repos/kivy/plyer/issues/201","number":201,"state":"open","locked":false,"title":"Sysinfo","user":{"login":"kiok46","id":7335120,"avatar_url":"https://avatars.githubusercontent.com/u/7335120?v=3","gravatar_id":"","url":"https://api.github.com/users/kiok46","html_url":"https://github.com/kiok46","followers_url":"https://api.github.com/users/kiok46/followers","following_url":"https://api.github.com/users/kiok46/following{/other_user}","gists_url":"https://api.github.com/users/kiok46/gists{/gist_id}","starred_url":"https://api.github.com/users/kiok46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiok46/subscriptions","organizations_url":"https://api.github.com/users/kiok46/orgs","repos_url":"https://api.github.com/users/kiok46/repos","events_url":"https://api.github.com/users/kiok46/events{/privacy}","received_events_url":"https://api.github.com/users/kiok46/received_events","type":"User","site_admin":false},"body":"Sysinfo:\r\nCurrently displays details like: platform, processor, version, os name and more to be added in future.\r\nRight now, I have only used \"platform\" module of python. ","created_at":"2016-04-30T19:03:53Z","updated_at":"2016-08-09T22:15:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9873a1448c79a6a24c483c8bb55686c59ed32812","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kivy/plyer/pulls/201/commits","review_comments_url":"https://api.github.com/repos/kivy/plyer/pulls/201/comments","review_comment_url":"https://api.github.com/repos/kivy/plyer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kivy/plyer/issues/201/comments","statuses_url":"https://api.github.com/repos/kivy/plyer/statuses/fad0e156420605b316d7aead361184d62b97315d","head":{"label":"kiok46:sysinfo","ref":"sysinfo","sha":"fad0e156420605b316d7aead361184d62b97315d","user":{"login":"kiok46","id":7335120,"avatar_url":"https://avatars.githubusercontent.com/u/7335120?v=3","gravatar_id":"","url":"https://api.github.com/users/kiok46","html_url":"https://github.com/kiok46","followers_url":"https://api.github.com/users/kiok46/followers","following_url":"https://api.github.com/users/kiok46/following{/other_user}","gists_url":"https://api.github.com/users/kiok46/gists{/gist_id}","starred_url":"https://api.github.com/users/kiok46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiok46/subscriptions","organizations_url":"https://api.github.com/users/kiok46/orgs","repos_url":"https://api.github.com/users/kiok46/repos","events_url":"https://api.github.com/users/kiok46/events{/privacy}","received_events_url":"https://api.github.com/users/kiok46/received_events","type":"User","site_admin":false},"repo":{"id":47987061,"name":"plyer","full_name":"kiok46/plyer","owner":{"login":"kiok46","id":7335120,"avatar_url":"https://avatars.githubusercontent.com/u/7335120?v=3","gravatar_id":"","url":"https://api.github.com/users/kiok46","html_url":"https://github.com/kiok46","followers_url":"https://api.github.com/users/kiok46/followers","following_url":"https://api.github.com/users/kiok46/following{/other_user}","gists_url":"https://api.github.com/users/kiok46/gists{/gist_id}","starred_url":"https://api.github.com/users/kiok46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiok46/subscriptions","organizations_url":"https://api.github.com/users/kiok46/orgs","repos_url":"https://api.github.com/users/kiok46/repos","events_url":"https://api.github.com/users/kiok46/events{/privacy}","received_events_url":"https://api.github.com/users/kiok46/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kiok46/plyer","description":"Plyer is a platform-independent Python wrapper for platform-dependent APIs","fork":true,"url":"https://api.github.com/repos/kiok46/plyer","forks_url":"https://api.github.com/repos/kiok46/plyer/forks","keys_url":"https://api.github.com/repos/kiok46/plyer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiok46/plyer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiok46/plyer/teams","hooks_url":"https://api.github.com/repos/kiok46/plyer/hooks","issue_events_url":"https://api.github.com/repos/kiok46/plyer/issues/events{/number}","events_url":"https://api.github.com/repos/kiok46/plyer/events","assignees_url":"https://api.github.com/repos/kiok46/plyer/assignees{/user}","branches_url":"https://api.github.com/repos/kiok46/plyer/branches{/branch}","tags_url":"https://api.github.com/repos/kiok46/plyer/tags","blobs_url":"https://api.github.com/repos/kiok46/plyer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiok46/plyer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiok46/plyer/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiok46/plyer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiok46/plyer/statuses/{sha}","languages_url":"https://api.github.com/repos/kiok46/plyer/languages","stargazers_url":"https://api.github.com/repos/kiok46/plyer/stargazers","contributors_url":"https://api.github.com/repos/kiok46/plyer/contributors","subscribers_url":"https://api.github.com/repos/kiok46/plyer/subscribers","subscription_url":"https://api.github.com/repos/kiok46/plyer/subscription","commits_url":"https://api.github.com/repos/kiok46/plyer/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiok46/plyer/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiok46/plyer/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiok46/plyer/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiok46/plyer/contents/{+path}","compare_url":"https://api.github.com/repos/kiok46/plyer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiok46/plyer/merges","archive_url":"https://api.github.com/repos/kiok46/plyer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiok46/plyer/downloads","issues_url":"https://api.github.com/repos/kiok46/plyer/issues{/number}","pulls_url":"https://api.github.com/repos/kiok46/plyer/pulls{/number}","milestones_url":"https://api.github.com/repos/kiok46/plyer/milestones{/number}","notifications_url":"https://api.github.com/repos/kiok46/plyer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiok46/plyer/labels{/name}","releases_url":"https://api.github.com/repos/kiok46/plyer/releases{/id}","deployments_url":"https://api.github.com/repos/kiok46/plyer/deployments","created_at":"2015-12-14T16:28:57Z","updated_at":"2016-01-24T21:09:28Z","pushed_at":"2016-08-09T12:43:39Z","git_url":"git://github.com/kiok46/plyer.git","ssh_url":"git@github.com:kiok46/plyer.git","clone_url":"https://github.com/kiok46/plyer.git","svn_url":"https://github.com/kiok46/plyer","homepage":"https://plyer.readthedocs.org","size":714,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"kivy:master","ref":"master","sha":"a648fe3649ad12ad3f985c7f30f3a11d16fb828c","user":{"login":"kivy","id":1266152,"avatar_url":"https://avatars.githubusercontent.com/u/1266152?v=3","gravatar_id":"","url":"https://api.github.com/users/kivy","html_url":"https://github.com/kivy","followers_url":"https://api.github.com/users/kivy/followers","following_url":"https://api.github.com/users/kivy/following{/other_user}","gists_url":"https://api.github.com/users/kivy/gists{/gist_id}","starred_url":"https://api.github.com/users/kivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kivy/subscriptions","organizations_url":"https://api.github.com/users/kivy/orgs","repos_url":"https://api.github.com/users/kivy/repos","events_url":"https://api.github.com/users/kivy/events{/privacy}","received_events_url":"https://api.github.com/users/kivy/received_events","type":"Organization","site_admin":false},"repo":{"id":7764556,"name":"plyer","full_name":"kivy/plyer","owner":{"login":"kivy","id":1266152,"avatar_url":"https://avatars.githubusercontent.com/u/1266152?v=3","gravatar_id":"","url":"https://api.github.com/users/kivy","html_url":"https://github.com/kivy","followers_url":"https://api.github.com/users/kivy/followers","following_url":"https://api.github.com/users/kivy/following{/other_user}","gists_url":"https://api.github.com/users/kivy/gists{/gist_id}","starred_url":"https://api.github.com/users/kivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kivy/subscriptions","organizations_url":"https://api.github.com/users/kivy/orgs","repos_url":"https://api.github.com/users/kivy/repos","events_url":"https://api.github.com/users/kivy/events{/privacy}","received_events_url":"https://api.github.com/users/kivy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kivy/plyer","description":"Plyer is a platform-independent Python wrapper for platform-dependent APIs","fork":false,"url":"https://api.github.com/repos/kivy/plyer","forks_url":"https://api.github.com/repos/kivy/plyer/forks","keys_url":"https://api.github.com/repos/kivy/plyer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kivy/plyer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kivy/plyer/teams","hooks_url":"https://api.github.com/repos/kivy/plyer/hooks","issue_events_url":"https://api.github.com/repos/kivy/plyer/issues/events{/number}","events_url":"https://api.github.com/repos/kivy/plyer/events","assignees_url":"https://api.github.com/repos/kivy/plyer/assignees{/user}","branches_url":"https://api.github.com/repos/kivy/plyer/branches{/branch}","tags_url":"https://api.github.com/repos/kivy/plyer/tags","blobs_url":"https://api.github.com/repos/kivy/plyer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kivy/plyer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kivy/plyer/git/refs{/sha}","trees_url":"https://api.github.com/repos/kivy/plyer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kivy/plyer/statuses/{sha}","languages_url":"https://api.github.com/repos/kivy/plyer/languages","stargazers_url":"https://api.github.com/repos/kivy/plyer/stargazers","contributors_url":"https://api.github.com/repos/kivy/plyer/contributors","subscribers_url":"https://api.github.com/repos/kivy/plyer/subscribers","subscription_url":"https://api.github.com/repos/kivy/plyer/subscription","commits_url":"https://api.github.com/repos/kivy/plyer/commits{/sha}","git_commits_url":"https://api.github.com/repos/kivy/plyer/git/commits{/sha}","comments_url":"https://api.github.com/repos/kivy/plyer/comments{/number}","issue_comment_url":"https://api.github.com/repos/kivy/plyer/issues/comments{/number}","contents_url":"https://api.github.com/repos/kivy/plyer/contents/{+path}","compare_url":"https://api.github.com/repos/kivy/plyer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kivy/plyer/merges","archive_url":"https://api.github.com/repos/kivy/plyer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kivy/plyer/downloads","issues_url":"https://api.github.com/repos/kivy/plyer/issues{/number}","pulls_url":"https://api.github.com/repos/kivy/plyer/pulls{/number}","milestones_url":"https://api.github.com/repos/kivy/plyer/milestones{/number}","notifications_url":"https://api.github.com/repos/kivy/plyer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kivy/plyer/labels{/name}","releases_url":"https://api.github.com/repos/kivy/plyer/releases{/id}","deployments_url":"https://api.github.com/repos/kivy/plyer/deployments","created_at":"2013-01-23T00:27:33Z","updated_at":"2016-08-09T04:51:51Z","pushed_at":"2016-08-09T12:43:39Z","git_url":"git://github.com/kivy/plyer.git","ssh_url":"git@github.com:kivy/plyer.git","clone_url":"https://github.com/kivy/plyer.git","svn_url":"https://github.com/kivy/plyer","homepage":"https://plyer.readthedocs.org","size":1280,"stargazers_count":343,"watchers_count":343,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":94,"forks":99,"open_issues":94,"watchers":343,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kivy/plyer/pulls/201"},"html":{"href":"https://github.com/kivy/plyer/pull/201"},"issue":{"href":"https://api.github.com/repos/kivy/plyer/issues/201"},"comments":{"href":"https://api.github.com/repos/kivy/plyer/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/kivy/plyer/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/kivy/plyer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kivy/plyer/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/kivy/plyer/statuses/fad0e156420605b316d7aead361184d62b97315d"}}}}
{"actor":{"display_login":"kiok46"}}