PHP 클래스 Mailjet\Client

저자: Guillaume Badi ([email protected])
파일 보기 프로젝트 열기: mailjet/mailjet-apiv3-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $key, string $secret, boolean $call = true ) Client constructor requires:
delete ( array $resource, array $args = [] ) : Response Trigger a GET request
get ( array $resource, array $args = [] ) : Response Trigger a GET request
post ( array $resource, array $args = [] ) : Response Trigger a POST request
put ( array $resource, array $args = [] ) : Response Trigger a POST request
setSecureProtocol ( boolean $bIsSecured ) : boolean Sets if we need to use https or http protocol while using API Url

비공개 메소드들

메소드 설명
_call ( string $method, string $resource, string $action, array $args ) : Response Magic method to call a mailjet resource
buildURL ( string $resource, string $action, string $id, string $actionid ) : string Build the final call url without query strings
getApiUrl ( ) : string Build the base API url depending on wether user need a secure connection or not

메소드 상세

__construct() 공개 메소드

Client constructor requires:
public __construct ( string $key, string $secret, boolean $call = true )
$key string Mailjet API Key
$secret string Mailjet API Secret
$call boolean performs the call or not

delete() 공개 메소드

Trigger a GET request
public delete ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
리턴 Response

get() 공개 메소드

Trigger a GET request
public get ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
리턴 Response

post() 공개 메소드

Trigger a POST request
public post ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
리턴 Response

put() 공개 메소드

Trigger a POST request
public put ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
리턴 Response

setSecureProtocol() 공개 메소드

Sets if we need to use https or http protocol while using API Url
public setSecureProtocol ( boolean $bIsSecured ) : boolean
$bIsSecured boolean True use https / false use http
리턴 boolean true if we set value false otherwise