| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class CeoComp extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/ceo-compensation'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Book extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'crypto/{symbol}/book'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Price extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'crypto/{symbol}/price'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Quote extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'crypto/{symbol}/quote'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Deep extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'deep?symbols={symbol}'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Auction extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'deep/auction?symbols={symbol}'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Book extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'deep/book?symbols={symbol}'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class SecurityEvent extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'deep/security-event?symbols={symbol}'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | */ |
|
| 34 | protected function validateParams(): void |
|
| 35 | { |
|
| 36 | if (empty($this->symbol)) { |
|
| 37 | throw WrongData::invalidValuesProvided('Please provide symbol to query!'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class AdvancedStats extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/advanced-stats'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class BalanceSheet extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/balance-sheet'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Company extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/company'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Logo extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/logo'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class PreviousDayPrice extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/previous'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class Price extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/price'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 9-41 (lines=33) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class PriceTarget extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/price-target'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @return string |
|
| 25 | */ |
|
| 26 | protected function getFullEndpoint(): string |
|
| 27 | { |
|
| 28 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @return bool|void |
|
| 33 | * @throws WrongData |
|
| 34 | */ |
|
| 35 | protected function validateParams(): void |
|
| 36 | { |
|
| 37 | if (empty($this->symbol)) { |
|
| 38 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 14-48 (lines=35) @@ | ||
| 11 | * @package Digitonic\IexCloudSdk\Stocks |
|
| 12 | * todo - Currently there is no mechanism for optional fields to be passed. |
|
| 13 | */ |
|
| 14 | class IntradayPrices extends BaseRequest |
|
| 15 | { |
|
| 16 | const ENDPOINT = 'stock/{symbol}/intraday-prices'; |
|
| 17 | ||
| 18 | /** |
|
| 19 | * Create constructor. |
|
| 20 | * |
|
| 21 | * @param IEXCloud $api |
|
| 22 | */ |
|
| 23 | public function __construct(IEXCloud $api) |
|
| 24 | { |
|
| 25 | parent::__construct($api); |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * If the oddLot property is set, add it to the end of the endpoint string. |
|
| 30 | * |
|
| 31 | * @return string |
|
| 32 | */ |
|
| 33 | protected function getFullEndpoint(): string |
|
| 34 | { |
|
| 35 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @return bool|void |
|
| 40 | * @throws WrongData |
|
| 41 | */ |
|
| 42 | protected function validateParams(): void |
|
| 43 | { |
|
| 44 | if (empty($this->symbol)) { |
|
| 45 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| @@ 9-43 (lines=35) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseRequest; |
|
| 8 | ||
| 9 | class VolumeByVenue extends BaseRequest |
|
| 10 | { |
|
| 11 | const ENDPOINT = 'stock/{symbol}/volume-by-venue'; |
|
| 12 | ||
| 13 | /** |
|
| 14 | * Create constructor. |
|
| 15 | * |
|
| 16 | * @param IEXCloud $api |
|
| 17 | */ |
|
| 18 | public function __construct(IEXCloud $api) |
|
| 19 | { |
|
| 20 | parent::__construct($api); |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * If the field property is set, add it to the end of the endpoint string. |
|
| 25 | * |
|
| 26 | * @return string |
|
| 27 | */ |
|
| 28 | protected function getFullEndpoint(): string |
|
| 29 | { |
|
| 30 | return str_replace('{symbol}', $this->symbol, self::ENDPOINT); |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @return bool|void |
|
| 35 | * @throws WrongData |
|
| 36 | */ |
|
| 37 | protected function validateParams(): void |
|
| 38 | { |
|
| 39 | if (empty($this->symbol)) { |
|
| 40 | throw WrongData::invalidValuesProvided('Please provide a symbol to query!'); |
|
| 41 | } |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||