Skip to content

laraccess/laraccess-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laraccess API Client

Latest Version on Packagist Software License Build Status Total Downloads

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.