public
|
#
__construct( user_id $user_id = '', app_id $auth = array(), auth $app_id = API::API_DEFAULT_APPLICATION, Catapult\RESTClient::endpoint() $endpoint = API::API_ENDPOINT, $interop = API::APPLICATION_JSON )
CTor for RESTful
client default to definition
of endpoint, interop format
CTor for RESTful
client default to definition
of endpoint, interop format
Parameters
- $user_id
- Catapult User Id
- $auth
- Primary app id
- $app_id
- API Credentials
- $endpoint
- Catapult endpoint
- $interop
|
protected
|
#
setOption( $k, $t )
Set an option
for request
Set an option
for request
Parameters
|
protected
|
#
options( k $k )
Return all options assigned
to element k. These are all CURL
properites and can be found @
Return all options assigned
to element k. These are all CURL
properites and can be found @
Parameters
|
public static
|
#
endpoint( endpoint: $endpoint = API::API_ENDPOINT )
Set the Catapult endpoint to be used
Set the Catapult endpoint to be used
To reset to the default use:
Catapult\RESTClient::endpoint();
Parameters
|
public static
|
#
ssl( on: $on = TRUE )
Whether to use
ssl or not. To extend
support of SSL you can use
a private key file which will
be used in conjuction with the RESTclient.
Catapult\RESTClient::ssl(TRUE)
Catapult\RESTClient::ssl_key("./path_to_key");
Whether to use
ssl or not. To extend
support of SSL you can use
a private key file which will
be used in conjuction with the RESTclient.
Catapult\RESTClient::ssl(TRUE)
Catapult\RESTClient::ssl_key("./path_to_key");
To turn off (use no ssl):
Catapult\RESTClient::ssl(FALSE);
Parameters
|
public static
|
#
sslKey( file: $file )
Set the SSL key file
used in CURL requests.
Set the SSL key file
used in CURL requests.
Parameters
- $file
- or fully qualified file path
|
public static
|
#
verify( verify: $verify = TRUE )
Do we need to verify
this SSL request? By default
we only do if there is a key
provided. If not, no
Do we need to verify
this SSL request? By default
we only do if there is a key
provided. If not, no
Parameters
|
public
|
#
join( url: $url, $users = TRUE )
Concatenate URL according to Catapult endpoints
Concatenate URL according to Catapult endpoints
In some cases we dont need to join,
As a result this should only provide the user id, and base string
Parameters
|
public
|
#
get( -> $url, -> $params = array(), $join = TRUE, $users = TRUE )
Perform get requests
against Catapult API.
Perform get requests
against Catapult API.
Parameters
- $url
- string [partially qualified]
- $params
- bool
- $join
- $users
|
public
|
#
post( -> $url, -> $data = array(), $join = TRUE, $users = TRUE, $mixed = FALSE )
POST request
Parameters
- $url
- [partially qualified]
- $data
- boolean
- $join
- $users
- $mixed
|
public
|
#
put( -> $url, -> $data )
PUT request
Parameters
- $url
- [partially qualified]
- $data
- boolean
|
public
|
#
delete( -> $url, -> $data = null )
DELETE request
Parameters
- $url
- [partially qualified]
- $data
- boolean
|