Documentation

AnalyticsClient
in package

AnalyticsClient provides the PHP based language binding to the https based API of ZohoAnalytics.

Table of Contents

Constants

CLIENT_VERSION  = "2.4.0"

Properties

$accounts_server_url  : string
$analytics_server_url  : string
$connection_timeout  : int
$proxy  : bool
$proxy_host  : string
$proxy_password  : string
$proxy_port  : int
$proxy_type  : string
$proxy_user_name  : string
$read_timeout  : int

Methods

__construct()  : mixed
Creates a new Zoho AnalyticsClient instance.
getBulkInstance()  : BulkAPI
Returns a new BulkAPI instance.
getConnectionTimeout()  : int
Returns the timeout until a connection is established.A value of zero means the timeout is not used.
getDashboards()  : array<string|int, mixed>
Returns list of all accessible dashboards.
getOrgInstance()  : OrgAPI
Returns a new OrgAPI instance.
getOrgs()  : array<string|int, mixed>
Returns list of all accessible organizations.
getOwnedDashboards()  : array<string|int, mixed>
Returns list of owned dashboards.
getOwnedWorkspaces()  : array<string|int, mixed>
Returns list of owned workspaces.
getReadTimeout()  : int
Returns the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.
getRecentViews()  : array<string|int, mixed>
Returns list of recently accessed views.
getSharedDashboards()  : array<string|int, mixed>
Returns list of shared dashboards.
getSharedWorkspaces()  : array<string|int, mixed>
Returns list of shared workspaces.
getViewDetails()  : array<string|int, mixed>
Returns details of the specified view.
getViewInstance()  : ViewAPI
Returns a new ViewAPI instance.
getWorkspaceDetails()  : array<string|int, mixed>
Returns details of the specified workspace.
getWorkspaceInstance()  : WorkspaceAPI
Returns a new WorkspaceAPI instance.
getWorkspaces()  : array<string|int, mixed>
Returns list of all accessible workspaces.
setConnectionTimeout()  : mixed
Sets the timeout until a connection is established. A value of zero means the timeout is not used. The default value is 15000.
setProxy()  : mixed
Used to specify the proxy server details.
setReadTimeout()  : mixed
Sets the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

Constants

CLIENT_VERSION

public const CLIENT_VERSION = "2.4.0"

CLIENT_VERSION It contain the API client version.It is a constant one.

Properties

$accounts_server_url

private string $accounts_server_url = "https://@@ACCOUNTS_URL"

Account URL.

$analytics_server_url

private string $analytics_server_url = "https://@@ANALYTICS_URL"

The base request API URL.

$connection_timeout

private int $connection_timeout

It is a time value until a connection is established.

$proxy

private bool $proxy = \FALSE

It will indicate whether the proxy is set or not.

$proxy_host

private string $proxy_host

The hostname/ip address of the proxy-server.

$proxy_password

private string $proxy_password

The password for proxy-server authentication.

$proxy_type

private string $proxy_type

Can be any one ( HTTP , HTTPS , BOTH ).Specify "BOTH" if same configuration can be used for both HTTP and HTTPS.

$proxy_user_name

private string $proxy_user_name

The user name for proxy-server authentication.

$read_timeout

private int $read_timeout

It is a time value until waiting to read data.

Methods

__construct()

Creates a new Zoho AnalyticsClient instance.

public __construct(string $client_id, string $client_secret, string $refresh_token) : mixed
Parameters
$client_id : string

Client id of the user.

$client_secret : string

Client secret of the user.

$refresh_token : string

Refresh token of the user. click here to know about OAuth.

Tags
link

getBulkInstance()

Returns a new BulkAPI instance.

public getBulkInstance(string $org_id, string $workspace_id) : BulkAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

Return values
BulkAPI

instance.

getConnectionTimeout()

Returns the timeout until a connection is established.A value of zero means the timeout is not used.

public getConnectionTimeout() : int
Return values
int

Connection timeout limit.

getDashboards()

Returns list of all accessible dashboards.

public getDashboards() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Dashboard list.

getOrgInstance()

Returns a new OrgAPI instance.

public getOrgInstance(string $org_id) : OrgAPI
Parameters
$org_id : string

The ID of the organization.

Return values
OrgAPI

instance.

getOrgs()

Returns list of all accessible organizations.

public getOrgs() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Organization list.

getOwnedDashboards()

Returns list of owned dashboards.

public getOwnedDashboards() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Dashboard list.

getOwnedWorkspaces()

Returns list of owned workspaces.

public getOwnedWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Workspace list.

getReadTimeout()

Returns the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

public getReadTimeout() : int
Return values
int

Read timeout limit.

getRecentViews()

Returns list of recently accessed views.

public getRecentViews() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

View list.

getSharedDashboards()

Returns list of shared dashboards.

public getSharedDashboards() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Dashboard list.

getSharedWorkspaces()

Returns list of shared workspaces.

public getSharedWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Workspace list.

getViewDetails()

Returns details of the specified view.

public getViewDetails(string $view_id[, array<string|int, mixed> $config = array() ]) : array<string|int, mixed>
Parameters
$view_id : string

The ID of the view.

$config : array<string|int, mixed> = array()

Contains any additional control parameters. Can be null.

Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

View details.

getViewInstance()

Returns a new ViewAPI instance.

public getViewInstance(string $org_id, string $workspace_id, string $view_id) : ViewAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

$view_id : string

The ID of the view.

Return values
ViewAPI

instance.

getWorkspaceDetails()

Returns details of the specified workspace.

public getWorkspaceDetails(string $workspace_id) : array<string|int, mixed>
Parameters
$workspace_id : string

The ID of the workspace.

Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Workspace details.

getWorkspaceInstance()

Returns a new WorkspaceAPI instance.

public getWorkspaceInstance(string $org_id, string $workspace_id) : WorkspaceAPI
Parameters
$org_id : string

The ID of the organization.

$workspace_id : string

The ID of the workspace.

Return values
WorkspaceAPI

instance.

getWorkspaces()

Returns list of all accessible workspaces.

public getWorkspaces() : array<string|int, mixed>
Tags
throws
IOException

If any communication related error(s) like request time out occurs when trying to contact the service.

throws
ServerException

If the server has received the request but did not process the request due to some error.

throws
ParseException

If the server has responded but client was not able to parse the response.

Return values
array<string|int, mixed>

Workspace list.

setConnectionTimeout()

Sets the timeout until a connection is established. A value of zero means the timeout is not used. The default value is 15000.

public setConnectionTimeout(int $time_limit) : mixed
Parameters
$time_limit : int

An integer value.

setProxy()

Used to specify the proxy server details.

public setProxy(string $proxy_host, int $proxy_port, string $proxy_type, string $proxy_user_name, string $proxy_password) : mixed
Parameters
$proxy_host : string

The hostname/ip address of the proxy-server.

$proxy_port : int

The proxy server port.

$proxy_type : string

Can be any one ( HTTP , HTTPS , BOTH ).Specify "BOTH" if same configuration can be used for both HTTP and HTTPS.

$proxy_user_name : string

The user name for proxy-server authentication.

$proxy_password : string

The password for proxy-server authentication.

setReadTimeout()

Sets the timeout until waiting to read data. A value of zero means the timeout is not used. The default value is 15000.

public setReadTimeout(int $time_limit) : mixed
Parameters
$time_limit : int

An integer value.


        
On this page

Search results