AbstractWhatsAppApi
extends AbstractHttpRequest
in package
AbstractYes
Holds methods that used to comunicate with the WhatsApp business API and cloud API.
Tags
Table of Contents
Methods
- apiBusiness() : false|null|array<string|int, mixed>
- apiCloud() : false|null|array<string|int, mixed>
- request() : false|null|array<string|int, mixed>
- Performs a request to WhatsApp API.
- httpRequest() : false|null|array<string|int, mixed>
Methods
apiBusiness()
public
final apiBusiness(string $method, string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ][, string $queryParams = '' ]) : false|null|array<string|int, mixed>
Parameters
- $method : string
- $endpoint : string
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
- $queryParams : string = ''
Tags
Return values
false|null|array<string|int, mixed>apiCloud()
public
final apiCloud(string $method, string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : false|null|array<string|int, mixed>
Parameters
- $method : string
- $endpoint : string
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
Tags
Return values
false|null|array<string|int, mixed>request()
Performs a request to WhatsApp API.
public
final request(string $method, string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : false|null|array<string|int, mixed>
Parameters
- $method : string
- $endpoint : string
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
Tags
Return values
false|null|array<string|int, mixed> —raw WhatsApp response converted to array or an empty array on failure.
httpRequest()
protected
httpRequest(string $method, string $baseUrl, string $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : false|null|array<string|int, mixed>
Parameters
- $method : string
- $baseUrl : string
- $endpoint : string
- $body : array<string|int, mixed> = []
- $headers : array<string|int, mixed> = []
Tags
Return values
false|null|array<string|int, mixed> —false may be returned also due to license problems.