PHP 클래스 SparkPost\ResourceBase

파일 보기 프로젝트 열기: sparkpost/php-sparkpost

보호된 프로퍼티들

프로퍼티 타입 설명
$endpoint The api endpoint that gets prepended to all requests send through this resource.
$sparkpost SparkPost object used to make requests.

공개 메소드들

메소드 설명
__construct ( SparkPost $sparkpost, string $endpoint ) Sets up the Resource.
delete ( $uri = '', $payload = [], $headers = [] ) Sends delete request to API at the set endpoint.
get ( $uri = '', $payload = [], $headers = [] ) Sends get request to API at the set endpoint.
post ( $payload = [], $headers = [] ) Sends post request to API at the set endpoint.
put ( $uri = '', $payload = [], $headers = [] ) Sends put request to API at the set endpoint.
request ( $method = 'GET', $uri = '', $payload = [], $headers = [] ) : SparkPostPromise Sends requests to SparkPost object to the resource endpoint.

메소드 상세

__construct() 공개 메소드

Sets up the Resource.
public __construct ( SparkPost $sparkpost, string $endpoint )
$sparkpost SparkPost - the sparkpost instance that this resource is attached to
$endpoint string - the endpoint that this resource wraps

delete() 공개 메소드

Sends delete request to API at the set endpoint.
public delete ( $uri = '', $payload = [], $headers = [] )

get() 공개 메소드

Sends get request to API at the set endpoint.
public get ( $uri = '', $payload = [], $headers = [] )

post() 공개 메소드

Sends post request to API at the set endpoint.
public post ( $payload = [], $headers = [] )

put() 공개 메소드

Sends put request to API at the set endpoint.
public put ( $uri = '', $payload = [], $headers = [] )

request() 공개 메소드

Sends requests to SparkPost object to the resource endpoint.
public request ( $method = 'GET', $uri = '', $payload = [], $headers = [] ) : SparkPostPromise
리턴 SparkPostPromise or SparkPostResponse depending on sync or async request

프로퍼티 상세

$endpoint 보호되어 있는 프로퍼티

The api endpoint that gets prepended to all requests send through this resource.
protected $endpoint

$sparkpost 보호되어 있는 프로퍼티

SparkPost object used to make requests.
protected $sparkpost