Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 31a9f27

Browse files
author
Mateusz Gostański
committed
Updated Readme & Changelog
1 parent 2aa1292 commit 31a9f27

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All 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

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff 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

2516
Then you can just simply call:
2617

2718
``` php
2819
use 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

0 commit comments

Comments
 (0)