| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 6 | class RorDataService |
||
| 7 | { |
||
| 8 | |||
| 9 | protected $apiUrl = 'https://api.ror.org/organizations'; |
||
| 10 | |||
| 11 | public function __construct() { |
||
| 12 | |||
| 13 | } |
||
| 14 | |||
| 15 | public function searchTermReplacement($searchTerm) { |
||
| 16 | return urlencode($searchTerm); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function searchOrganisationRequest($searchTerm) { |
||
| 20 | $response = Request::get($this->apiUrl . '?query=' . $this->searchTermReplacement($searchTerm)) |
||
| 21 | ->send(); |
||
| 22 | |||
| 23 | return ['entries' => $response->body->items]; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getOrganisationData($rorId) { |
||
| 31 | } |
||
| 32 | |||
| 33 | } |