Skip to content

Commit

Permalink
📝 Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tgeorgel committed Jan 27, 2023
1 parent 5387972 commit 9b03877
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
## Introduction
<a name="introduction"></a>

This package is PHP client for the Sellsy API. It's a light wrapper around the Guzzle HTTP client. It's designed to be as simple as possible to use, while being robust.
This package is a PHP client for the Sellsy API. It's a light wrapper around the Guzzle HTTP client. It's designed to be as simple as possible to use, while being robust.

The client **only supports the V2 of Sellsy API**. If you're looking for a V1 client, checkout [TeknooSoftware/sellsy-client](https://github.com/TeknooSoftware/sellsy-client) instead.

Expand Down Expand Up @@ -50,16 +50,12 @@ $contact = new Entities\Contact([
$api = new Api\ContactsApi();
$response = $api->store($contact);

if (!$response->failed()) {
// request failed
}

var_dump(
$response->json()
);
```

This also means you will get back DTO entities from the Sellsy API when performing GET requests :
This also mean you will get back DTO entities from the Sellsy API when performing GET requests :

```php
$api = new Bluerock\Sellsy\Api\CompaniesApi();
Expand All @@ -71,9 +67,9 @@ $company = $api->find("123")->entity();
$companies = $api->index()->entities();
```

If you're unfamiliar with DTOs or need more details, make sure to have a look at the [spatie/data-transfer-object](https://github.com/spatie/data-transfer-object) package, used by this client.
If you're unfamiliar with DTOs or need some documentation on it, make sure to have a look at the [spatie/data-transfer-object](https://github.com/spatie/data-transfer-object) package, used by this client.

Please keep in mind that this package is still in development process. If you're missing an [endpoint implementation](#dev_status), do not hesitate to [contribute](#contribute) or open an issue on this repository.
Please keep in mind that this package is still in development. If you're missing an [endpoint implementation](#dev_status), do not hesitate to [contribute](#contribute) or open an issue on this repository.

## Installation
<a name="installation"></a>
Expand Down Expand Up @@ -119,7 +115,7 @@ Learn more about Sellsy API v2 credentials on the [official documentation](https
### The basics
<a name="usage_query_basic"></a>

Each API domain is represented by a plurialized class (eg: `Contacts`, `Items`, `Taxes`). Each class contains methods used to perform requests agaisn't domain endpoints.
Each API domain is represented by a plurialized class (eg: `Contacts`, `Items`, `Taxes`). Each class contains methods used to perform requests agaisn't the domain's endpoints.

The easiest way to start querying the API is by initializing the corresponding class :

Expand Down Expand Up @@ -160,9 +156,9 @@ This client is using the Laravel CRUD operations keywords to name methods :
| DELETE | `destroy` | Delete a single resource. |
| GET | `search` | Search resources. |

Any additional method available in Sellsy API would follow the camel case convention. For example, additional Companies methods would look like this :
Any additional method described in the domain's documentation would follow the camel case convention. For example, additional [Companies](https://api.sellsy.com/doc/v2/#tag/Companies) methods would look like this :

| Sellsy Company operation | Client Method |
| Operation | Client Method |
|---|---|
| Get a company address. | `CompaniesApi::showAddress(...)` |
| Update a company address. | `CompaniesApi::updateAddress(...)` |
Expand Down
2 changes: 1 addition & 1 deletion src/Api/ItemsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* The API client for the `items` namespace.
*
* @package cedricWebsenso/sellsy-client
* @package bluerock/sellsy-client
* @author Cédric <cedric@websenso.com>
* @version 1.0
* @access public
Expand Down

0 comments on commit 9b03877

Please sign in to comment.