Skip to content

Wrapper for the Rule REST api.

License

Notifications You must be signed in to change notification settings

codepeak/api-wrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RULE api wrapper

Package wrapping an RULE Mailer api using an guzzlehttp client as backend for the requests

Installation

Regular composer installation supposed, like: composer require rulecom/api-wrapper

Integration with Laravel

Use src/LaravelServiceProvider.php to register API instances in your application. Create config/rule-api.php file for the API configuration.

Then you'll be able to disectly use configured API classes

use Rule\ApiWrapper\Api\V2\Subscriber\Subscriber;

class Foo
{
    private $subscriberApi;

    public function __construct(Subscriber $subscriberApi)
    {
        $this->subscriberApi = $subscriberApi;
    }

    public function createMeSomeSubscriber($params)
    {
        //... do something 
        $this->subscriberApi->create([
            'email' => $email,
            //... see docs for detailes
        ]);
    }
}

Docs

For the docs please refer docs folder in this repository.

About

Wrapper for the Rule REST api.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%