https://github.com/laraccess/laraccess-api
PHP Laraccess API Client
https://github.com/laraccess/laraccess-api
api client guzzle laraccess laraccess-api
Last synced: 3 months ago
JSON representation
PHP Laraccess API Client
- Host: GitHub
- URL: https://github.com/laraccess/laraccess-api
- Owner: laraccess
- License: mpl-2.0
- Created: 2017-05-10T19:19:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T07:46:44.000Z (about 9 years ago)
- Last Synced: 2025-12-14T15:26:24.828Z (6 months ago)
- Topics: api, client, guzzle, laraccess, laraccess-api
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laraccess API Client
[](https://packagist.org/packages/m1guelpf/laraccess-api)
[](LICENSE.md)
[](https://travis-ci.org/m1guelpf/laraccess-api)
[](https://packagist.org/packages/m1guelpf/laraccess-api)
This package makes it easy to interact with [Laraccess](https://github.com/m1guelpf/laraccess).
## Installation
You can install the package via composer:
``` bash
composer require m1guelpf/laraccess-api
```
## Usage
You must pass a the API token to the constructor of `M1guelpf\LaraccessApi\Laraccess`.
``` php
$laraccess = new \M1guelpf\LaraccessApi\Laraccess('YOUR_LARACCESS_API_TOKEN');
```
or you can skip the token and use the `connect()` method later
``` php
$laraccess = new \M1guelpf\LaraccessApi\Laraccess();
$laraccess->connect('YOUR_LARACCESS_API_TOKEN');
```
### Get User info
``` php
$laraccess->getUser();
```
### Create User
``` php
$laraccess->createUser($user);
```
### Edit User
``` php
$laraccess->editUser($user);
```
### Delete User
``` php
$laraccess->deleteUser();
```
### Get User Campaigns
``` php
$laraccess->getUserCampaigns();
```
### Get Campaign
``` php
$laraccess->getCampaign($id);
```
### Create Campaign
``` php
$laraccess->createCampaign($campaign);
```
### Edit Campaign
``` php
$laraccess->editCampaign($id, $campaign);
```
### Delete Campaign
``` php
$laraccess->deleteCampaign($id);
```
### Get Campaign Leads
``` php
$laraccess->getCampaignLeads($id);
```
### Get Lead
``` php
$laraccess->getLead($id);
```
### Create Lead
``` php
$laraccess->createLead($id, $lead);
```
### Edit Lead
``` php
$laraccess->editLead($id, $lead);
```
### Delete Lead
``` php
$laraccess->deleteLead($id, $lead);
```
### Invite Lead
``` php
$laraccess->inviteLead($id);
```
### Renenerate Token
``` php
$laraccess->regenerateToken($set);
```
where `$set` is false if you don't want to use the new token on future requests.
### Get the Guzzle Client
``` php
$laraccess->getClient();
```
### Set the Guzzle Client
``` php
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$laraccess->setClient($client);
```
where $client is an instance of `\GuzzleHttp\Client`.
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ composer test
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker.
## Credits
- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)
## License
The Mozilla Public License 2.0 (MPL-2.0). Please see [License File](LICENSE.md) for more information.