| 1 | <?php |
||
| 11 | class Client |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * URL padrão |
||
| 16 | */ |
||
| 17 | const DEFAULT_URL = "http://fipeapi.appspot.com/api/1/"; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Timeout padrão |
||
| 21 | */ |
||
| 22 | const DEFAULT_TIMEOUT = 10; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Client constructor. |
||
| 26 | * |
||
| 27 | * @param array|null $params |
||
| 28 | * @throws \Exception |
||
| 29 | */ |
||
| 30 | public function __construct(array $params = null) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param FipeApiParameter $key |
||
| 54 | * @param string $value |
||
| 55 | */ |
||
| 56 | public function setParameter($key, $value) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param FipeApiParameter $key |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getParameter($key) |
||
| 69 | |||
| 70 | } |