railroad / maropost
Maropost API For Laravel
Installs: 25 241
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: ~7
- guzzlehttp/guzzle: ~6.0
- laravel/framework: 5.6.*
Requires (Dev)
- orchestra/testbench: ~3.5
- phpunit/php-code-coverage: ~6.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2024-10-29 05:34:51 UTC
README
Maropost API For Laravel
ContactService
All methods below are public.
Inject the Railroad\Maropost\Services\ContactService
class where needed.
/** @var Railroad\Maropost\Services\ContactService $contactService */ protected $contactService; public function __constructor(Railroad\Maropost\Services\ContactService $contactService){ $this->contactService = $contactService; }
Include namespace at top of file:
use Railroad\Maropost\Services\ContactService;
... to save yourself having to specify the namespace everywhere:
/** @var ContactService $contactService */ protected $contactService; public function __constructor(ContactService $contactService){ $this->contactService = $contactService; }
createOrUpdate
Creates a contact without a list. Updates if already existing email is passed.
Usage Example
$content = $this->contactService->createOrUpdate(ContactVO $contact);
Parameters
Responses
update
Update a contact without a list, based on id. This method should be used when update the email address.
Usage Example
$content = $this->contactService->update($contactId, ContactVO $contact);
Parameters
Responses
findOneByEmail
Gets the contact according to email address
Usage Example
$content = $this->contactService->findOneByEmail($email);
Parameters
Responses
findOneById
Gets the contact based on id
Usage Example
$content = $this->contactService->findOneById($id);
Parameters
Responses
addContactToLists
Add contact to specified lists.
Usage Example
$content = $this->contactService->addContactToLists($listIds, $contactId);
Parameters
Responses
removeContactFromLists
Remove contact from specified lists.
Usage Example
$content = $this->contactService->removeContactFromLists($listIds, $contactId);
Parameters
Responses
getListContacts
Gets the list of contacts for the specified list
Usage Example
$content = $this->contactService->getListContacts($listId);
Parameters
Responses
deleteContactByEmail
Deletes specified contact from all the lists.
Usage Example
$content = $this->contactService->deleteContactByEmail($email);
Parameters
Responses
addTagsToContact
Add tags to contact
Usage Example
$content = $this->contactService->addTagsToContact($contactId, $tags);
Parameters
Responses
removeTagsFromContact
Remove specified tags from contact
Usage Example
$content = $this->contactService->removeTagsFromContact($contactId, $tags);
Parameters
Responses
ListService
All methods below are public.
Inject the Railroad\Maropost\Services\ListService
class where needed
/** @var Railroad\Maropost\Services\ListService $listService */ protected $listService; public function __constructor(Railroad\Maropost\Services\ListService $listService){ $this->listService = $listService; }
Include namespace at top of file:
use Railroad\Maropost\Services\ListService;
... to save yourself having to specify the namespace everywhere:
/** @var ListService $listService */ protected $listService; public function __constructor(ListService $listService){ $this->listService = $listService; }
index
Gets the lists
Usage Example
$content = $this->listService->index();
Parameters
Responses
create
Create a new list.
Usage Example
$content = $this->listService->create(ListVO $list);
Parameters
Responses
update
Modify a list.
Usage Example
$content = $this->listService->update($id, ListVO $list);
Parameters
Responses
delete
Delete a list.
Usage Example
$content = $this->listService->delete($listId);
Parameters
Responses
Null
show
Pull list with specified id.
Usage Example
$content = $this->listService->show($listId);
Parameters
Responses
TagService
All methods below are public.
Inject the Railroad\Maropost\Services\TagService
class where needed
/** @var Railroad\Maropost\Services\TagService $tagService */ protected $tagService; public function __constructor(Railroad\Maropost\Services\TagService $tagService){ $this->tagService = $tagService; }
Include namespace at top of file:
use Railroad\Maropost\Services\TagService;
... to save yourself having to specify the namespace everywhere:
/** @var TagService $tagService */ protected $tagService; public function __constructor(TagService $tagService){ $this->tagService = $tagService; }
create
Create a new tag.
Usage Example
$content = $this->tagService->create(TagVO $tag);
Parameters
Responses
findByName
Find a tag by name.
Usage Example
$content = $this->tagService->findByName($name);
Parameters
Responses
findById
Find a tag by id.
Usage Example
$content = $this->tagService->findById($tagId);
Parameters
Responses
delete
Delete tag
Usage Example
$content = $this->tagService->delete($tagId);
Parameters
Responses
Null