Skip to content

Commit

Permalink
Merge pull request #19 from minasm/master
Browse files Browse the repository at this point in the history
Fix return type of getApiUri() method
  • Loading branch information
radicalloop authored Oct 15, 2024
2 parents 5060a42 + abe6382 commit cd8d7c8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Api/EodClient.php
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

namespace RadicalLoop\Eod\Api;

use GuzzleHttp\Exception\GuzzleException;
use RadicalLoop\Eod\Config;
use GuzzleHttp\Client as GuzzleHttpClient;

@@ -45,21 +46,22 @@ public function __construct(Config $config)
/**
* get api uri
*
* @return void
* @return string
*/
public function getApiUri()
public function getApiUri(): string
{
return rtrim($this->config->getApiUrl(), '/') . $this->urlSegment;
}

/**
* send request for api
*
* @param string $symbol
* @param array $params
* @param string $symbol
* @param array $params
* @return string|json
* @throws GuzzleException
*/
public function get($symbol, $params = [])
public function get(string $symbol, array $params = [])
{
$segment = $symbol ? ('/' . $symbol) : '';
$httpQuery = http_build_query(array_merge($params, ['api_token' => $this->config->getApiToken()]));

0 comments on commit cd8d7c8

Please sign in to comment.