PHP Class MC4WP_API_v3_Client

Afficher le fichier Open project: dannyvankooten/mailchimp-for-wordpress Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $api_key ) Constructor
delete ( string $resource ) : mixed
get ( string $resource, array $args = [] ) : mixed
get_last_response ( ) : array | WP_Error
get_last_response_body ( ) : string
get_last_response_headers ( ) : array
patch ( string $resource, array $data ) : mixed
post ( string $resource, array $data ) : mixed
put ( string $resource, array $data ) : mixed

Private Methods

Méthode Description
get_headers ( ) : array
parse_response ( array | WP_Error $response ) : mixed
request ( string $method, string $resource, array $data = [] ) : mixed
reset ( ) Empties all data from previous response

Method Details

__construct() public méthode

Constructor
public __construct ( string $api_key )
$api_key string

delete() public méthode

public delete ( string $resource ) : mixed
$resource string
Résultat mixed

get() public méthode

public get ( string $resource, array $args = [] ) : mixed
$resource string
$args array
Résultat mixed

get_last_response() public méthode

public get_last_response ( ) : array | WP_Error
Résultat array | WP_Error

get_last_response_body() public méthode

public get_last_response_body ( ) : string
Résultat string

get_last_response_headers() public méthode

public get_last_response_headers ( ) : array
Résultat array

patch() public méthode

public patch ( string $resource, array $data ) : mixed
$resource string
$data array
Résultat mixed

post() public méthode

public post ( string $resource, array $data ) : mixed
$resource string
$data array
Résultat mixed

put() public méthode

public put ( string $resource, array $data ) : mixed
$resource string
$data array
Résultat mixed