- Api
- ApiFactory
- Campaign
- Client
- Customization
- InvalidResourceException
- LaravelServiceProvider
- Request
- RequestFactory
- Response
- ResponseErrorException
- ResponseFactory
- Subscriber
- Suppression
- Tag
- Template
- Transaction
- Full name: \Rule\ApiWrapper\Api\Api
Create api instance
Api::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Api::getClient( ): \Rule\ApiWrapper\Client\Client
- Full name: \Rule\ApiWrapper\ApiFactory
Creates api resource
ApiFactory::make( string $key, string $resource, $version = 'v2' ): \Rule\ApiWrapper\Api
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$key |
string | Rule api key |
$resource |
string | Resource name [subscriber, campaign, customization, suppression, tag, template, transaction] |
$version |
**** |
- Full name: \Rule\ApiWrapper\Api\V2\Campaign\Campaign
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Campaign::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Campaign::getClient( ): \Rule\ApiWrapper\Client\Client
Get campaigns
Campaign::getList( integer $limit = 100 ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$limit |
integer | Limit for the campaigns count, default 100 max 100 |
Return Value:
Request result
See Also:
Get campaign data.
Campaign::get( integer $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
integer | Id of the campaign. |
Return Value:
Request result
See Also:
Get campaign statistics.
Campaign::statistics( integer $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
integer | Id of the campaign. |
Return Value:
Request result
See Also:
Send campaign.
Campaign::send( array $campaign ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$campaign |
array | Campaign data formated according {@link https://rule.se/apidoc/#campaigns-send-campaign-post} |
See Also:
Schedule campaign.
Campaign::schedule( array $campaign ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$campaign |
array | Campaign data formated according {@link https://rule.se/apidoc/#campaigns-send-campaign-post} |
See Also:
- Full name: \Rule\ApiWrapper\Guzzle\Client
- Parent class: \Rule\ApiWrapper\Client\Client
Creates new Guzzle client instance
Client::__construct( string $apiKey, string $version = 'v2', string $baseUrl = "http://app.rule.io/api/" )
Client constructor.
Parameters:
Parameter | Type | Description |
---|---|---|
$apiKey |
string | |
$version |
string | |
$baseUrl |
string |
Get Rule api key
Client::getApiKey( ): string
Get Rule api version
Client::getVersion( ): string
Get base Rule url
Client::getBaseUrl( ): string
Client::setApiKey( $key )
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
**** |
Client::setVersion( $version )
Parameters:
Parameter | Type | Description |
---|---|---|
$version |
**** |
Client::setBaseUrl( $baseUrl )
Parameters:
Parameter | Type | Description |
---|---|---|
$baseUrl |
**** |
Makes get request
Client::get( \Rule\ApiWrapper\Client\Request $request ): \Rule\ApiWrapper\Client\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\Rule\ApiWrapper\Client\Request | Request instance |
Makes post request
Client::post( \Rule\ApiWrapper\Client\Request $request ): \Rule\ApiWrapper\Client\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\Rule\ApiWrapper\Client\Request | Request instance |
Makes put request
Client::put( \Rule\ApiWrapper\Client\Request $request ): \Rule\ApiWrapper\Client\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\Rule\ApiWrapper\Client\Request | Request instance |
Makes delete request
Client::delete( \Rule\ApiWrapper\Client\Request $request ): \Rule\ApiWrapper\Client\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\Rule\ApiWrapper\Client\Request | Request instance |
- Full name: \Rule\ApiWrapper\Api\V2\Customization\Customization
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Customization::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Customization::getClient( ): \Rule\ApiWrapper\Client\Client
Create fields.
Customization::create( array $fields ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$fields |
array | Array of fields {@link https://rule.se/apidoc/#subscriber-fields-create-groups-and-fields-post} |
Return Value:
Response result
Get groups.
Customization::getList( integer $limit = 100 ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$limit |
integer | Limit of the results count |
Return Value:
Request result
Get group fields
Customization::get( integer $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
integer | Id of the group |
Return Value:
Request result
- Full name: \Rule\ApiWrapper\Api\Exception\InvalidResourceException
- Parent class:
- Full name: \Rule\ApiWrapper\LaravelServiceProvider
- Parent class:
LaravelServiceProvider::register( )
- Full name: \Rule\ApiWrapper\Client\Request
Request constructor. Create new Request instance
Request::__construct( $resource )
Parameters:
Parameter | Type | Description |
---|---|---|
$resource |
**** |
Sets request query
Request::setQuery( array $query )
Parameters:
Parameter | Type | Description |
---|---|---|
$query |
array |
Returns request query
Request::getQuery( ): mixed
Sets id parameter to Request
Request::setIdParam( string $idParam )
Parameters:
Parameter | Type | Description |
---|---|---|
$idParam |
string |
Returns request id parameter
Request::getIdParam( ): mixed
Sets request parameters
Request::setParams( array $params )
Parameters:
Parameter | Type | Description |
---|---|---|
$params |
array |
Returns request parameters
Request::getParams( ): mixed
Sets request resource
Request::setResource( string $resource )
Parameters:
Parameter | Type | Description |
---|---|---|
$resource |
string |
Returns request resource
Request::getResource( ): mixed
Sets request subresources
Request::setSubresources( array $subresources )
Parameters:
Parameter | Type | Description |
---|---|---|
$subresources |
array |
Returns request subresources
Request::getSubresources( ): mixed
Adds subresources to request
Request::addSubresource( array $subresource )
Parameters:
Parameter | Type | Description |
---|---|---|
$subresource |
array |
Set request method
Request::setMethod( string $method )
Parameters:
Parameter | Type | Description |
---|---|---|
$method |
string |
Returns request method
Request::getMethod( ): mixed
Get relative url from request
Request::getRelativeUrl( ): string
Return Value:
Relative url
- Full name: \Rule\ApiWrapper\Guzzle\RequestFactory
RequestFactory::make( \Rule\ApiWrapper\Client\Request $request, $baseUrl = "" )
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$request |
\Rule\ApiWrapper\Client\Request | |
$baseUrl |
**** |
- Full name: \Rule\ApiWrapper\Client\Response
Response constructor. Creates new Response instance.
Response::__construct( $statusCode, array $data )
Parameters:
Parameter | Type | Description |
---|---|---|
$statusCode |
**** | |
$data |
array |
Returns Response status code.
Response::getStatusCode( ): integer
Returns Response result.
Response::getData( ): array
- Full name: \Rule\ApiWrapper\Api\Exception\ResponseErrorException
- Parent class:
- Full name: \Rule\ApiWrapper\Guzzle\ResponseFactory
ResponseFactory::make( \GuzzleHttp\Psr7\Response $response )
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$response |
\GuzzleHttp\Psr7\Response |
- Full name: \Rule\ApiWrapper\Api\V2\Subscriber\Subscriber
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Subscriber::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Subscriber::getClient( ): \Rule\ApiWrapper\Client\Client
Creates new subscriber
Subscriber::create( array $subscriber ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$subscriber |
array |
See Also:
Create new subscribers
Subscriber::createMultiple( array $subscribers ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$subscribers |
array |
See Also:
Returns subscribers list
Subscriber::getList( integer $limit = 100 ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$limit |
integer |
See Also:
Returns single subscriber
Subscriber::get( $id, string $identifyBy = 'email' ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$identifyBy |
string |
See Also:
Returns subscriber fields
Subscriber::getFields( $id, string $identifyBy = "email" ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$identifyBy |
string |
See Also:
Updates subscriber
Subscriber::update( $id, $subscriber ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$subscriber |
**** |
See Also:
Adds tags to subscriber
Subscriber::addTags( $id, array $tags, string $identifyBy = 'email' ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$tags |
array | |
$identifyBy |
string |
See Also:
Returns subscriber tags
Subscriber::getTags( $id, string $identifyBy = "email" ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$identifyBy |
string |
See Also:
Removes subscriber tags
Subscriber::deleteTag( $id, $tag, string $identifyBy = "email" ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** | |
$tag |
**** | |
$identifyBy |
string |
See Also:
Subscriber::delete( integer|string $id, string $identifiedBy = 'email' ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
integer|string | User identifier to delete |
$identifiedBy |
string | Identifier type |
Return Value:
Server response
See Also:
Subscriber::deleteMultiple( array $subscribers ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$subscribers |
array |
Subscriber::import( string $filename, array $mappings, array $tags ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$filename |
string | Name of the file stored on s3 |
$mappings |
array | Mappings for the columns |
$tags |
array | Tags to import to |
Return Value:
Response data
- Full name: \Rule\ApiWrapper\Api\V2\Suppression\Suppression
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Suppression::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Suppression::getClient( ): \Rule\ApiWrapper\Client\Client
Returns suppression list
Suppression::getList( integer $limit = 100 ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$limit |
integer |
See Also:
Creates new Suppression
Suppression::create( array $suppressions ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$suppressions |
array |
See Also:
- Full name: \Rule\ApiWrapper\Api\V2\Tag\Tag
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Tag::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Tag::getClient( ): \Rule\ApiWrapper\Client\Client
Get list of tags
Tag::getList( integer $limit = 100 ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$limit |
integer |
See Also:
Delete tag by id
Tag::delete( $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** |
See Also:
Clear associations between subscriber and tag
Tag::clear( $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** |
See Also:
- Full name: \Rule\ApiWrapper\Api\V2\Template\Template
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Template::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Template::getClient( ): \Rule\ApiWrapper\Client\Client
Get list of templates
Template::getList( ): array
See Also:
Get template by id
Template::get( $id ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$id |
**** |
See Also:
- Full name: \Rule\ApiWrapper\Api\V2\Transaction\Transaction
- Parent class: \Rule\ApiWrapper\Api\Api
Create api instance
Transaction::__construct( \Rule\ApiWrapper\Client\Client $client )
Parameters:
Parameter | Type | Description |
---|---|---|
$client |
\Rule\ApiWrapper\Client\Client | HTTP client implementation for api |
Get http client
Transaction::getClient( ): \Rule\ApiWrapper\Client\Client
Send transaction
Transaction::send( array $transaction ): array
Parameters:
Parameter | Type | Description |
---|---|---|
$transaction |
array |
See Also:
This document was automatically generated from source code comments on 2017-07-17 using phpDocumentor and cvuorinen/phpdoc-markdown-public