Property | Type | Description | |
---|---|---|---|
$auth | array | Holds the username and password for requests. | |
$body | array | Holds the arguments for the body. | |
$callBuilt | boolean | Has the call been built yet |
Method | Description | |
---|---|---|
buildBody ( array | string $values, null $key = null ) | Builds the body part of the request and adds it to the body array. | |
setPassword ( string $password ) | Sets the password for auth. | |
setUser ( string $username ) | Sets the username for auth. |
Method | Description | |
---|---|---|
buildCall ( $url ) | Builds the API call address. | |
buildUrl ( array $segments = [] ) : string | Builds a URL. | |
getAuth ( ) : array | null | Returns the auth array for requests. If not set, will return null. | |
getBody ( ) : array | Returns the body array. | |
getRequest ( ) : mixed | Creates and sends a GET request to the requested URL. | |
postRequest ( ) : mixed | Creates and sends a POST request to the requested URL. |
protected getRequest ( ) : mixed | ||
return | mixed |
protected postRequest ( ) : mixed | ||
return | mixed |
public setPassword ( string $password ) | ||
$password | string |
protected array $auth | ||
return | array |