{"action":"opened","issue":{"url":"https://api.github.com/repos/dolejska-daniel/riot-api/issues/31","repository_url":"https://api.github.com/repos/dolejska-daniel/riot-api","labels_url":"https://api.github.com/repos/dolejska-daniel/riot-api/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/dolejska-daniel/riot-api/issues/31/comments","events_url":"https://api.github.com/repos/dolejska-daniel/riot-api/issues/31/events","html_url":"https://github.com/dolejska-daniel/riot-api/issues/31","id":391000839,"node_id":"MDU6SXNzdWUzOTEwMDA4Mzk=","number":31,"title":"Refactor DataDragonAPI calls from LeagueAPI","user":{"login":"dolejska-daniel","id":10078080,"node_id":"MDQ6VXNlcjEwMDc4MDgw","avatar_url":"https://avatars2.githubusercontent.com/u/10078080?v=4","gravatar_id":"","url":"https://api.github.com/users/dolejska-daniel","html_url":"https://github.com/dolejska-daniel","followers_url":"https://api.github.com/users/dolejska-daniel/followers","following_url":"https://api.github.com/users/dolejska-daniel/following{/other_user}","gists_url":"https://api.github.com/users/dolejska-daniel/gists{/gist_id}","starred_url":"https://api.github.com/users/dolejska-daniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolejska-daniel/subscriptions","organizations_url":"https://api.github.com/users/dolejska-daniel/orgs","repos_url":"https://api.github.com/users/dolejska-daniel/repos","events_url":"https://api.github.com/users/dolejska-daniel/events{/privacy}","received_events_url":"https://api.github.com/users/dolejska-daniel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dolejska-daniel","id":10078080,"node_id":"MDQ6VXNlcjEwMDc4MDgw","avatar_url":"https://avatars2.githubusercontent.com/u/10078080?v=4","gravatar_id":"","url":"https://api.github.com/users/dolejska-daniel","html_url":"https://github.com/dolejska-daniel","followers_url":"https://api.github.com/users/dolejska-daniel/followers","following_url":"https://api.github.com/users/dolejska-daniel/following{/other_user}","gists_url":"https://api.github.com/users/dolejska-daniel/gists{/gist_id}","starred_url":"https://api.github.com/users/dolejska-daniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolejska-daniel/subscriptions","organizations_url":"https://api.github.com/users/dolejska-daniel/orgs","repos_url":"https://api.github.com/users/dolejska-daniel/repos","events_url":"https://api.github.com/users/dolejska-daniel/events{/privacy}","received_events_url":"https://api.github.com/users/dolejska-daniel/received_events","type":"User","site_admin":false},"assignees":[{"login":"dolejska-daniel","id":10078080,"node_id":"MDQ6VXNlcjEwMDc4MDgw","avatar_url":"https://avatars2.githubusercontent.com/u/10078080?v=4","gravatar_id":"","url":"https://api.github.com/users/dolejska-daniel","html_url":"https://github.com/dolejska-daniel","followers_url":"https://api.github.com/users/dolejska-daniel/followers","following_url":"https://api.github.com/users/dolejska-daniel/following{/other_user}","gists_url":"https://api.github.com/users/dolejska-daniel/gists{/gist_id}","starred_url":"https://api.github.com/users/dolejska-daniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolejska-daniel/subscriptions","organizations_url":"https://api.github.com/users/dolejska-daniel/orgs","repos_url":"https://api.github.com/users/dolejska-daniel/repos","events_url":"https://api.github.com/users/dolejska-daniel/events{/privacy}","received_events_url":"https://api.github.com/users/dolejska-daniel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-12-14T07:46:29Z","updated_at":"2018-12-14T07:46:29Z","closed_at":null,"author_association":"OWNER","body":"DataDragonAPI calls template:\r\n```php\r\n$result = false;\r\ntry\r\n{\r\n\t// Fetch StaticData from JSON files\r\n\t$result = DataDragonAPI::FUNCTION_NAME(...$PARAMETERS);\r\n\tif (!$result) throw new ServerException(\"StaticData failed to be loaded.\");\r\n\r\n\t$this->result_data = $result;\r\n}\r\ncatch (DataDragonExceptions\\SettingsException $ex)\r\n{\r\n\tthrow new SettingsException(\"DataDragon API was not initialized properly! StaticData endpoints cannot be used.\");\r\n}\r\ncatch (DataDragonExceptions\\ArgumentException $ex)\r\n{\r\n\tthrow new RequestException($ex->getMessage(), $ex->getCode());\r\n}\r\nfinally\r\n{\r\n\t// Parse array and create instances\r\n\treturn new ApiObject($result, $this);\r\n}\r\n```\r\n\r\nShould be refactored to \"kind of\" match up with normal API calls:\r\n```php\r\n$this->setEndpoint(\"/lol/league/\" . self::RESOURCE_LEAGUE_VERSION . \"/grandmasterleagues/by-queue/{$game_queue_type}\")\r\n\t->setResource(self::RESOURCE_LEAGUE, \"/grandmasterleagues/by-queue/%s\")\r\n\t->makeCall();\r\n\r\nreturn new Objects\\LeagueListDto($this->getResult(), $this);\r\n```"}}
{"actor":{"display_login":"dolejska-daniel"}}