Class AnalyticsClient
AnalyticsClient provides the C# based language binding to the HTTPS based API of Zoho Analytics.
Inherited Members
Namespace: ZohoAnalytics
Assembly: ZohoAnalytics.dll
Syntax
public class AnalyticsClient
Constructors
AnalyticsClient(string, string, string)
Creates a new AnalyticsClient instance.
Declaration
public AnalyticsClient(string clientId, string clientSecret, string refreshToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clientId | The client ID string that has been obtained during the client registration. |
| string | clientSecret | The client secret string that has been obtained during the client registration. |
| string | refreshToken | The refresh token string that has been obtained through accounts API. |
Methods
GetBulkInstance(long, long)
Creates a new BulkAPI instance.
Declaration
public IBulkAPI GetBulkInstance(long orgId, long workspaceId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | orgId | The ID of the organization. |
| long | workspaceId | The ID of the workspace. |
Returns
| Type | Description |
|---|---|
| IBulkAPI | BulkAPI instance. |
GetConnectionTimeout()
Returns the timeout until a connection is established.
Declaration
public int GetConnectionTimeout()
Returns
| Type | Description |
|---|---|
| int | The timeout value. |
GetDashboards()
Returns list of all accessible dashboards.
Declaration
public JsonElement GetDashboards()
Returns
| Type | Description |
|---|---|
| JsonElement | All dashboards list. |
GetOrgInstance(long)
Creates a new OrgAPI instance.
Declaration
public IOrgAPI GetOrgInstance(long orgId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | orgId | The ID of the organization. |
Returns
| Type | Description |
|---|---|
| IOrgAPI | OrgAPI instance. |
GetOrgs()
Returns list of all accessible organizations.
Declaration
public JsonElement GetOrgs()
Returns
| Type | Description |
|---|---|
| JsonElement | Organizations list. |
GetOwnedDashboards()
Returns list of owned dashboards.
Declaration
public JsonElement GetOwnedDashboards()
Returns
| Type | Description |
|---|---|
| JsonElement | Owned dashboards list. |
GetOwnedWorkspaces()
Returns list of owned workspaces.
Declaration
public JsonElement GetOwnedWorkspaces()
Returns
| Type | Description |
|---|---|
| JsonElement | Owned workspaces list. |
GetReadTimeout()
Returns the read timeout value which will wait for the packet to receive from the server end.
Declaration
public int GetReadTimeout()
Returns
| Type | Description |
|---|---|
| int | The timeout value. |
GetRecentViews()
Returns list of recently accessed views.
Declaration
public JsonElement GetRecentViews()
Returns
| Type | Description |
|---|---|
| JsonElement | Recent views list. |
GetSharedDashboards()
Returns list of shared dashboards.
Declaration
public JsonElement GetSharedDashboards()
Returns
| Type | Description |
|---|---|
| JsonElement | Shared dashboards list. |
GetSharedWorkspaces()
Returns list of shared workspaces.
Declaration
public JsonElement GetSharedWorkspaces()
Returns
| Type | Description |
|---|---|
| JsonElement | Shared workspaces list. |
GetViewDetails(long, Dictionary<string, object>)
Returns details of the specified view.
Declaration
public JsonElement GetViewDetails(long viewId, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| JsonElement | View details. |
GetViewInstance(long, long, long)
Creates a new ViewAPI instance.
Declaration
public IViewAPI GetViewInstance(long orgId, long workspaceId, long viewId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | orgId | The ID of the organization. |
| long | workspaceId | The ID of the workspace. |
| long | viewId | The ID of the view. |
Returns
| Type | Description |
|---|---|
| IViewAPI | ViewAPI instance. |
GetWorkspaceDetails(long)
Returns details of the specified workspace.
Declaration
public JsonElement GetWorkspaceDetails(long workspaceId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | workspaceId | Id of the workspace. |
Returns
| Type | Description |
|---|---|
| JsonElement | Workspace details. |
GetWorkspaceInstance(long, long)
Creates a new WorkspaceAPI instance.
Declaration
public IWorkspaceAPI GetWorkspaceInstance(long orgId, long workspaceId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | orgId | The ID of the organization. |
| long | workspaceId | The ID of the workspace. |
Returns
| Type | Description |
|---|---|
| IWorkspaceAPI | WorkspaceAPI instance. |
GetWorkspaces()
Returns list of all accessible workspaces.
Declaration
public JsonElement GetWorkspaces()
Returns
| Type | Description |
|---|---|
| JsonElement | All workspaces list. |
SetAccountsServerURL(string)
Sets the accounts server URL.
Declaration
public void SetAccountsServerURL(string serverUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | serverUrl | ZohoAccounts server URL |
SetAnalyticsServerURL(string)
Sets the analytics server URL.
Declaration
public void SetAnalyticsServerURL(string serverUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | serverUrl | ZohoAnalytics server URL |
SetConnectionTimeout(int)
Sets the timeout until a connection is established.
Declaration
public void SetConnectionTimeout(int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| int | timeout | The timeout value. |
SetProxy(string, int, string, string)
To specify the proxy server details.
Declaration
public void SetProxy(string proxyHost, int proxyPort, string proxyUsername, string proxyPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | proxyHost | The hostname/IP address of the proxy server. |
| int | proxyPort | The proxy server port. |
| string | proxyUsername | The user name for proxy-server authentication. |
| string | proxyPassword | The password for proxy server authentication. |
SetReadTimeout(int)
Sets the read timeout which will wait for data response from the server end.
Declaration
public void SetReadTimeout(int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| int | timeout | The timeout value. |