gens-de-confiance / php-trustfully-api
Trustfully API client
Installs: 13 520
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- ext-curl: *
Requires (Dev)
- phpspec/phpspec: ^3.1
- symfony/var-dumper: ^3.1
This package is not auto-updated.
Last update: 2021-11-22 00:06:14 UTC
README
A simple Object Oriented wrapper for TrustFully API, written with PHP5.
See TrustFully API's documentation.
Features
- Follows PSR-0 conventions and coding standard: autoload friendly
- API entry points implementation state :
- Community
- Contact
- Membership
- Sponsorship
- User
Requirements
- PHP >= 5.4
- The PHP cURL extension
- The PHP JSON extension
- PHPUnit >= 4.0 (optional) to run the test suite
Install
$ composer require gens-de-confiance/php-trustfully-api
Usage
<?php require_once 'vendor/autoload.php'; try { $client = new TrustFully\Client('https://api.trustfully.com/v1/', 'CLIENT_API_KEY'); $me = $client->user->login('guillaume@gensdeconfiance.fr', 'azerty'); // ... $communities = $client->community->all(); // ... } catch (\Exception $e) { die($e->getMessage()); }
Alternatively, you can specify a host to bypass DNS resolution when instanciating the client:
<?php $client = new TrustFully\Client('https://10.17.10.17/v1/', 'CLIENT_API_KEY', 'api.trustfully.com');