| @@ 169-183 (lines=15) @@ | ||
| 166 | * |
|
| 167 | * @return array |
|
| 168 | */ |
|
| 169 | public function getFeed() |
|
| 170 | { |
|
| 171 | $requestModel = $this->prepareRequestModel('feed'); |
|
| 172 | $response = $this->requestService->doRequest($requestModel); |
|
| 173 | $responseObject = json_decode($response); |
|
| 174 | ||
| 175 | $feedObjectFactory = new FeedObjectFactory(); |
|
| 176 | $feedObj = []; |
|
| 177 | ||
| 178 | foreach ($responseObject->feed as $feed) { |
|
| 179 | $feedObj[] = $feedObjectFactory->getFeedObject($feed); |
|
| 180 | } |
|
| 181 | ||
| 182 | return $feedObj; |
|
| 183 | } |
|
| 184 | ||
| 185 | /** |
|
| 186 | * A summary of the guild that the character belongs to |
|
| @@ 445-460 (lines=16) @@ | ||
| 442 | * |
|
| 443 | * @return ReputationValueObject[] |
|
| 444 | */ |
|
| 445 | public function getTitles() |
|
| 446 | { |
|
| 447 | $requestModel = $this->prepareRequestModel('titles'); |
|
| 448 | $response = $this->requestService->doRequest($requestModel); |
|
| 449 | $responseObject = json_decode($response); |
|
| 450 | $titles = []; |
|
| 451 | ||
| 452 | foreach ($responseObject->titles as $title) { |
|
| 453 | $titles[] = new TitleValueObject( |
|
| 454 | $title->id, |
|
| 455 | $title->name |
|
| 456 | ); |
|
| 457 | } |
|
| 458 | ||
| 459 | return $titles; |
|
| 460 | } |
|
| 461 | ||
| 462 | /** |
|
| 463 | * @param string $addition |
|