Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apideck-libraries/php-sdk
https://github.com/apideck-libraries/php-sdk
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/apideck-libraries/php-sdk
- Owner: apideck-libraries
- License: other
- Created: 2022-04-07T08:34:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-30T13:58:09.000Z (about 1 month ago)
- Last Synced: 2024-09-30T15:11:13.746Z (about 1 month ago)
- Language: PHP
- Size: 19.3 MB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apideck PHP SDK
## Table of Contents
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Example](#example)
- [Support](#support)
- [License](#license)## Installation
### Requirements
PHP 7.3 and later.
Should also work with PHP 8.0 but has not been tested.### Composer
Install the latest SDK using composer:
```console
$ composer require apideck-libraries/php-sdk
```## Getting started
The module supports all Apideck API endpoints. For complete information about the API, head
to the [docs][2].### Configuration
A new Apideck instance is initialized by passing in required settings to the configuration.
```', '', '');
$apideck = new Apideck($config);
```Top level parameters (except for apiKey) can be overriden in specific resource calls.
```php
getCrmApi();
// Override consumerId serviceId as declared in initial configuration for this operation.
$serviceId = 'salesforce';
$response = $crmApi->contactsAll(
false,
null,
null,
$serviceId,
null,
10
);
```## Example
Retrieving a list of all contacts and updating the first record with a new address.
```php
', '', '');
$apideck = new Apideck($config);$crmApi = $apideck->getCrmApi();
$response = $crmApi->contactsAll(false, null, null, $serviceId, null, 10);
$data = $response->getData();
$result = $crmApi->contactsUpdate([
$data[0]->getId(),
new Contact([
"name" => "John Doe",
"first_name" => "John",
"last_name" => "Doe",
"addresses" => [
new Address([
"city" => "Hoboken",
"line1" => "Streetname 19",
"state" => "NY"
])
],
"phone_numbers" => [
new PhoneNumber([
"number" => "0486565656",
"phoneType" => "home"
])
]
])
]);var_dump($result);
```The following Apis are currently available:
### AccountingApi
Read the full documentation of the AccountingApi [here](./src/gen/docs/apis/AccountingApi.md).
### AtsApi
Read the full documentation of the AtsApi [here](./src/gen/docs/apis/AtsApi.md).
### ConnectorApi
Read the full documentation of the ConnectorApi [here](./src/gen/docs/apis/ConnectorApi.md).
### CrmApi
Read the full documentation of the CrmApi [here](./src/gen/docs/apis/CrmApi.md).
### EcommerceApi
Read the full documentation of the EcommerceApi [here](./src/gen/docs/apis/EcommerceApi.md).
### FileStorageApi
Read the full documentation of the FileStorageApi [here](./src/gen/docs/apis/FileStorageApi.md).
### HrisApi
Read the full documentation of the HrisApi [here](./src/gen/docs/apis/HrisApi.md).
### IssueTrackingApi
Read the full documentation of the IssueTrackingApi [here](./src/gen/docs/apis/IssueTrackingApi.md).
### LeadApi
Read the full documentation of the LeadApi [here](./src/gen/docs/apis/LeadApi.md).
### PosApi
Read the full documentation of the PosApi [here](./src/gen/docs/apis/PosApi.md).
### SmsApi
Read the full documentation of the SmsApi [here](./src/gen/docs/apis/SmsApi.md).
### VaultApi
Read the full documentation of the VaultApi [here](./src/gen/docs/apis/VaultApi.md).
### WebhookApi
Read the full documentation of the WebhookApi [here](./src/gen/docs/apis/WebhookApi.md).
## Support
Open an [issue][3]!
## License
[MIT][4]
[1]: https://apideck.com
[2]: https://developers.apideck.com/
[3]: https://github.com/apideck-libraries/php-sdk/issues/new
[4]: https://github.com/apideck-libraries/php-sdk/blob/main/LICENSE