https://github.com/erwane/openagenda-wrapper-guzzle
Guzzle wrapper for erwane/openagenda-api package.
https://github.com/erwane/openagenda-wrapper-guzzle
guzzle openagenda php
Last synced: 18 days ago
JSON representation
Guzzle wrapper for erwane/openagenda-api package.
- Host: GitHub
- URL: https://github.com/erwane/openagenda-wrapper-guzzle
- Owner: Erwane
- License: mit
- Created: 2024-12-29T10:06:29.000Z (4 months ago)
- Default Branch: 2.x
- Last Pushed: 2025-01-21T14:25:29.000Z (3 months ago)
- Last Synced: 2025-03-26T17:11:21.381Z (about 1 month ago)
- Topics: guzzle, openagenda, php
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Guzzle wrapper for OpenAgenda-API
[](LICENSE)
[](https://codecov.io/gh/Erwane/openagenda-wrapper-guzzle)
[](https://github.com/Erwane/openagenda-wrapper-guzzle/actions)
[](https://packagist.org/packages/Erwane/openagenda-wrapper-guzzle)
[](https://packagist.org/packages/Erwane/openagenda-wrapper-guzzle)Guzzle wrapper for [erwane/openagenda-api](https://github.com/Erwane/openagenda-api) package.
## Version map
| version | OpenAgenda-API Package | PHP min |
|---------|------------------------|---------|
| ^1.0 | 3.0.* | PHP 7.2 |
| ^2.0 | ^3.1 | PHP 8.0 |```php
use OpenAgenda\OpenAgenda;
use OpenAgenda\Wrapper\GuzzleWrapper// PSR-18 Http client.
$guzzleOptions = ['timeout' => 2.0];
$wrapper = new GuzzleWrapper($guzzleOptions);// PSR-16 Simple cache. Optional
$cache = new Psr16Cache();// Create the OpenAgenda client. The public key is required for reading data (GET)
// The private key is optional and only needed for writing data (POST, PUT, DELETE)
$oa = new OpenAgenda([
'public_key' => 'my public key', // Required
'secret_key' => 'my secret key', // Optional, only for create/update/delete
'wrapper' => $wrapper, // Required
'cache' => $cache, // Optional
'defaultLang' => 'fr', // Optional
]);
```Check [OpenAgenda API lib](https://github.com/Erwane/openagenda-api/blob/3.x/README.md) for details.