This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-10
lines changed
Expand file tree Collapse file tree 2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to ` api-client ` will be documented in this file
44
5+ ## 2.0.0 - 2021-01-04
6+
7+ - Delete "Action" in class names
8+ - Leave hard-coded configuration of Base URL and OAuth in config file
9+ - Use ApiClient as factory for CallApi class
10+ - Optimized for multiple use in same project
11+
512## 1.0.0 - 2020-12-18
613
714- initial release
Original file line number Diff line number Diff line change @@ -12,22 +12,28 @@ composer require grixu/api-client
1212
1313## Usage
1414
15- At first set up your ` .env ` file:
16- ``` dotenv
17- API_BASE_URL=""
18- API_CLIENT_KEY=""
19- API_CLIENT_ID=""
20- API_OAUTH=""
21- API_ERROR_LOGGING=true
22- API_ERROR_LOG_CHANNEL="api-client"
23- ```
2415
2516Then you can just simply call:
2617
2718``` php
2819use Grixu\ApiClient\ApiClient;
2920
30- $reponse = ApiClient::make('/products');
21+ $client = ApiClient::make(
22+ 'base Url',
23+ 'oAuth Url',
24+ 'client ID',
25+ 'client Key',
26+ 'cache key',
27+ );
28+
29+ $response = $client->call('url path like /products');
30+ ```
31+
32+ ### Configuration
33+ You can adjust global configuration of APIClient in your ` .env ` file:
34+ ``` dotenv
35+ API_ERROR_LOGGING=true
36+ API_ERROR_LOG_CHANNEL="api-client"
3137```
3238
3339### Testing
You can’t perform that action at this time.
0 commit comments