Class AbstractKinveyClient
Base class of the Kinvey Client. Handles setup for making requests to Kinvey backend.
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public abstract class AbstractKinveyClient : object
Constructors
| Improve this Doc View SourceAbstractKinveyClient(HttpClient, String, String)
Initializes a new instance of the AbstractKinveyClient class.
Declaration
protected AbstractKinveyClient(HttpClient httpClient, string rootUrl, string servicePath)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The REST client to be used for network requests. |
System.String | rootUrl | The root URL of the backend service. |
System.String | servicePath | The service path. |
AbstractKinveyClient(HttpClient, String, String, IKinveyRequestInitializer)
Initializes a new instance of the AbstractKinveyClient class.
Declaration
protected AbstractKinveyClient(HttpClient httpClient, string rootUrl, string servicePath, IKinveyRequestInitializer initializer)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The REST client to be used for network requests. |
System.String | rootUrl | The root URL of the backend service |
System.String | servicePath | The service path |
IKinveyRequestInitializer | initializer | Kinvey request initializer |
Properties
| Improve this Doc View SourceApiVersion
Gets Kinvey api version.
Declaration
public string ApiVersion { get; }
Property Value
Type | Description |
---|---|
System.String | Kinvey api version. |
BaseUrl
Gets the base URL.
Declaration
public string BaseUrl { get; }
Property Value
Type | Description |
---|---|
System.String | The base URL. |
HttpClient
Gets the rest client.
Declaration
public HttpClient HttpClient { get; }
Property Value
Type | Description |
---|---|
HttpClient | The rest client. |
RequestInitializer
Gets the request initializer.
Declaration
public IKinveyRequestInitializer RequestInitializer { get; }
Property Value
Type | Description |
---|---|
IKinveyRequestInitializer | The request initializer. |
RootUrl
Gets the root URL.
Declaration
public string RootUrl { get; }
Property Value
Type | Description |
---|---|
System.String | The root URL. |
ServicePath
Gets the service path.
Declaration
public string ServicePath { get; }
Property Value
Type | Description |
---|---|
System.String | The service path. |
Methods
| Improve this Doc View SourceClearCustomRequestProperties()
Clears the currently saved custom request properties.
Declaration
public void ClearCustomRequestProperties()
GetClientAppVersion()
Gets the client app version.
Declaration
public string GetClientAppVersion()
Returns
Type | Description |
---|---|
System.String | The client app version. |
GetCustomRequestProperties()
Gets the custom request properties.
Declaration
public JObject GetCustomRequestProperties()
Returns
Type | Description |
---|---|
JObject | The custom request properties. |
InitializeRequest<T>(AbstractKinveyClientRequest<T>, String)
Initializes the request.
Declaration
public void InitializeRequest<T>(AbstractKinveyClientRequest<T> request, string clientID = null)
Parameters
Type | Name | Description |
---|---|---|
AbstractKinveyClientRequest<T> | request | Request. |
System.String | clientID | [optional] Client identifier. |
Type Parameters
Name | Description |
---|---|
T | The Type of the response |
SetClientAppVersion(Int32, Int32, Int32)
Sets the client app version, in terms major, minor and revision numbers.
Declaration
public void SetClientAppVersion(int major, int minor, int revision)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | major | Major version number |
System.Int32 | minor | Minor version number |
System.Int32 | revision | Revision number |
SetClientAppVersion(String)
Sets the client app version. We strongly recommend (but do not require) using version strings that conform to the pattern: "major.minor.patch", where all values are integers and minor and patch are optional. Here are some examples for version strings specified in this format - “1.1.5”, “2.6”, “3”
Declaration
public void SetClientAppVersion(string appVersion)
Parameters
Type | Name | Description |
---|---|---|
System.String | appVersion | App version. |
SetCustomRequestProperties(JObject)
Sets the custom request properties.
Declaration
public void SetCustomRequestProperties(JObject customheaders)
Parameters
Type | Name | Description |
---|---|---|
JObject | customheaders | Custom headers. |
SetCustomRequestProperty(String, JObject)
Sets a specific custom request property from a Json object.
Declaration
public void SetCustomRequestProperty(string key, JObject value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Custom request property key |
JObject | value | Custom request property value as a JObject |
SetCustomRequestProperty(String, String)
Sets a specific custom request property from a string.
Declaration
public void SetCustomRequestProperty(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Custom request property key |
System.String | value | Custom request property value as a string |