Google Shared Contacts Manager  1.0
Semestral project for BI-ZNF
APIService Class Reference

Class provides functionality to send an APIQuery to a server using curl PHP functionality. More...

Public Member Functions

 send (APIQuery &$q, $token)
 Send an APIQuery to it's target with authorization token in header. More...
 

Data Fields

const CODE_AUTH = 401
 

Private Member Functions

 setupGET (&$con, &$headers)
 Setup the curl connection as a GET request. More...
 
 setupPOST (&$con, array &$headers, APIQuery &$query)
 Setup the curl connection as POST request. More...
 
 setupDELETE (&$con, array &$headers, APIQuery &$query)
 Setup the curl connection as DELETE request. More...
 
 setupPUT (&$con, array &$headers, APIQuery &$query)
 Setup the curl connection as PUT request. More...
 

Detailed Description

Class provides functionality to send an APIQuery to a server using curl PHP functionality.

Member Function Documentation

◆ send()

send ( APIQuery $q,
  $token 
)

Send an APIQuery to it's target with authorization token in header.

Parameters
APIQuery$q
string$token

◆ setupDELETE()

setupDELETE ( $con,
array &  $headers,
APIQuery $query 
)
private

Setup the curl connection as DELETE request.

Will also fill the body of the request.

Parameters
resource$con
array$headers
APIQuery$query

◆ setupGET()

setupGET ( $con,
$headers 
)
private

Setup the curl connection as a GET request.

Parameters
resource$con
array$headers

◆ setupPOST()

setupPOST ( $con,
array &  $headers,
APIQuery $query 
)
private

Setup the curl connection as POST request.

Will also fill the body of the request.

Parameters
resource$con
array$headers
APIQuery$query

◆ setupPUT()

setupPUT ( $con,
array &  $headers,
APIQuery $query 
)
private

Setup the curl connection as PUT request.

Will also fill the body of the request.

Parameters
resource$con
array$headers
APIQuery$query

Field Documentation

◆ CODE_AUTH

const CODE_AUTH = 401

The documentation for this class was generated from the following file: