Package Data | |
---|---|
Maintainer Username: | eduardovargas |
Maintainer Contact: | eduardo.a.vargas@gmail.com (Eduardo Vargas) |
Package Create Date: | 2019-02-08 |
Package Last Update: | 2019-12-09 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:09:30 |
Package Statistics | |
---|---|
Total Downloads: | 445 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
#####Esse pacote é uma atualização e algumas motificações do pacote do Prince Ali Khan
https://github.com/princealikhan/laravel-mautic-api
A API deve estar ativada no Mautic. No Mautic, vá para a página Configuração (localizada no menu Configurações) e, em Configurações da API, ative a API do Mautic. Você também pode escolher qual protocolo OAuth2 usar aqui. Depois de salvar a configuração, acesse a página Credenciais da API (localizada no menu Configurações) e crie um novo cliente. Insira o URI de retorno / retorno de chamada para o qual a solicitação será enviada. Clique em Aplicar e copie o ID do cliente e o Segredo do cliente para o aplicativo que usará a API.
composer require eduardoavargas/laravel-mautic```
`php artisan vendor:publish`
## Configuration
You need to add your `client id`, `client secret` and `callback url` in `mautic.php` file that is found in your applications `config` directory.
## Authorization
This Library only support OAuth2 Authorization
you must need to create a OAuth2 client in order to use api.
## Registering Application
In order to register you application with mautic ping this url this is one time registration.
```url
http://your-app/mautic/application/register
Add Mautic Facade in your controller.
use Mautic;
Create a new contact in mautic.
$params = array(
'firstname' => 'Eduardo',
'lastname'=> 'Ali Khan',
'email' => 'eduardo.a.vargas@gmail.com'
);
Mautic::request('POST','contacts/new',$params);
Get List of all contacts
Mautic::request('GET','contacts');
Get a unique contact
Mautic::request('GET','contacts/1');
//where 1 is unique id for a contact.
Delete a contact
Mautic::request('Delete','contacts/1/delete');
[
"contacts",
"contacts/{id}",
"contacts/list/fields",
"contacts/list/owners",
"contacts/new",
"contacts/{id}/edit",
"contacts/{id}/delete",
"contacts/{id}/notes",
"contacts/{id}/segments",
"contacts/{id}/campaigns"
]
[
"assets",
"assets/{id}"
]
[
"campaigns",
"campaigns/{id}",
"campaigns/contact/{id}/add/{leadId}",
"campaigns/contact/{id}/remove/{leadId}"
]
[
"data",
"data/{type}",
]
[
"emails",
"emails/{id}",
"emails/{id}/send",
"emails/{id}/send/lead/{leadId}"
]
[
"forms",
"forms/{id}"
]
[
"pages",
"pages/{id}"
]
[
"points",
"points/{id}",
"points/triggers",
"points/triggers/{id}"
]
[
"reports",
"reports/{id}"
]
[
"segments",
"segments/contact/{id}/add/{leadId}",
"segments/contact/{id}/remove/{leadId}"
]
[
"roles",
"roles/{id}",
"users",
"users/{id}",
"users/list/roles",
"users/self",
"users/{id}/permissioncheck",
]
Please refer to Documentation. for all customizable parameters.