| 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) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param FipeApiParameter $key |
||
| 53 | * @param string $value |
||
| 54 | */ |
||
| 55 | public function setParameter($key, $value) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param FipeApiParameter $key |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getParameter($key) |
||
| 68 | |||
| 69 | } |