| @@ 9-40 (lines=32) @@ | ||
| 6 | use Digitonic\IexCloudSdk\Exceptions\WrongData; |
|
| 7 | use Digitonic\IexCloudSdk\Requests\BaseGet; |
|
| 8 | ||
| 9 | class CeoComp extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Book extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Price extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Quote extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Deep extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Auction extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class Book extends BaseGet |
|
| 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\BaseGet; |
|
| 8 | ||
| 9 | class SecurityEvent extends BaseGet |
|
| 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 | ||