m1guelpf / laraccess-api
PHP Client for the Laraccess API
Requires
- php: ^5.5|^7.0
- guzzlehttp/guzzle: ^6.1
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2024-11-05 05:19:00 UTC
README
This package makes it easy to interact with Laraccess.
Installation
You can install the package via composer:
composer require m1guelpf/laraccess-api
Usage
You must pass a the API token to the constructor of M1guelpf\LaraccessApi\Laraccess
.
$laraccess = new \M1guelpf\LaraccessApi\Laraccess('YOUR_LARACCESS_API_TOKEN');
or you can skip the token and use the connect()
method later
$laraccess = new \M1guelpf\LaraccessApi\Laraccess(); $laraccess->connect('YOUR_LARACCESS_API_TOKEN');
Get User info
$laraccess->getUser();
Create User
$laraccess->createUser($user);
Edit User
$laraccess->editUser($user);
Delete User
$laraccess->deleteUser();
Get User Campaigns
$laraccess->getUserCampaigns();
Get Campaign
$laraccess->getCampaign($id);
Create Campaign
$laraccess->createCampaign($campaign);
Edit Campaign
$laraccess->editCampaign($id, $campaign);
Delete Campaign
$laraccess->deleteCampaign($id);
Get Campaign Leads
$laraccess->getCampaignLeads($id);
Get Lead
$laraccess->getLead($id);
Create Lead
$laraccess->createLead($id, $lead);
Edit Lead
$laraccess->editLead($id, $lead);
Delete Lead
$laraccess->deleteLead($id, $lead);
Invite Lead
$laraccess->inviteLead($id);
Renenerate Token
$laraccess->regenerateToken($set);
where $set
is false if you don't want to use the new token on future requests.
Get the Guzzle Client
$laraccess->getClient();
Set the Guzzle Client
$client = new \GuzzleHttp\Client(); // Example Guzzle client $laraccess->setClient($client);
where $client is an instance of \GuzzleHttp\Client
.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker.
Credits
License
The Mozilla Public License 2.0 (MPL-2.0). Please see License File for more information.