Class GroupsClient
Inheritance
Implements
Namespace: FastReport.Cloud.Client
Assembly: FastReport.Cloud.SDK.dll
Syntax
public class GroupsClient : object, IGroupsClient
Constructors
GroupsClient(System.Net.Http.HttpClient)
Declaration
public GroupsClient(System.Net.Http.HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | httpClient |
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
PrepareRequestCallback
Declaration
public Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, string> PrepareRequestCallback { get; set; }
Property Value
Type | Description |
---|---|
Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, System.String> |
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateGroup(CreateGroupVM)
Create a new user group
Declaration
public virtual GroupVM CreateGroup(CreateGroupVM body = null)
Parameters
Type | Name | Description |
---|---|---|
CreateGroupVM | body | Model for creating |
Returns
Type | Description |
---|---|
GroupVM | Succesfully created |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CreateGroupAsync(CreateGroupVM, System.Threading.CancellationToken)
Create a new user group
Declaration
public virtual async System.Threading.Tasks.Task<GroupVM> CreateGroupAsync(CreateGroupVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CreateGroupVM | body | Model for creating |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupVM> | Succesfully created |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteGroup(String)
Delete group by identifier
Declaration
public virtual void DeleteGroup(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
DeleteGroupAsync(String, System.Threading.CancellationToken)
Delete group by identifier
Declaration
public virtual async System.Threading.Tasks.Task DeleteGroupAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Succesfully delete |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetGroup(String)
Gets group by identifier
Declaration
public virtual GroupVM GetGroup(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
Returns
Type | Description |
---|---|
GroupVM | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetGroupAsync(String, System.Threading.CancellationToken)
Gets group by identifier
Declaration
public virtual async System.Threading.Tasks.Task<GroupVM> GetGroupAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupVM> | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetGroupList(Nullable<Int32>, Nullable<Int32>)
Returns a list of current user's groups<br />
This method will return following data about groups : <br />
Id, Name, Created time (UTC), Edited time (UTC), creator id, <br />
editor id, subscription id
Declaration
public virtual GroupsVM GetGroupList(int? skip = null, int? take = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | skip | How many groups need to skip |
System.Nullable<System.Int32> | take | How many groups need to take |
Returns
Type | Description |
---|---|
GroupsVM | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetGroupListAsync(Nullable<Int32>, Nullable<Int32>, System.Threading.CancellationToken)
Returns a list of current user's groups<br />
This method will return following data about groups : <br />
Id, Name, Created time (UTC), Edited time (UTC), creator id, <br />
editor id, subscription id
Declaration
public virtual async System.Threading.Tasks.Task<GroupsVM> GetGroupListAsync(int? skip = null, int? take = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | skip | How many groups need to skip |
System.Nullable<System.Int32> | take | How many groups need to take |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupsVM> | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetMyPermissions(String)
Get current user's permissions to group
Declaration
public virtual GroupPermissionCRUDVM GetMyPermissions(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
Returns
Type | Description |
---|---|
GroupPermissionCRUDVM | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetMyPermissionsAsync(String, System.Threading.CancellationToken)
Get current user's permissions to group
Declaration
public virtual async System.Threading.Tasks.Task<GroupPermissionCRUDVM> GetMyPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupPermissionCRUDVM> | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetPermissions(String)
Gets group permissions by identifier
Declaration
public virtual GroupPermissionsVM GetPermissions(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
Returns
Type | Description |
---|---|
GroupPermissionsVM | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetPermissionsAsync(String, System.Threading.CancellationToken)
Gets group permissions by identifier
Declaration
public virtual async System.Threading.Tasks.Task<GroupPermissionsVM> GetPermissionsAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupPermissionsVM> | Succesfully retured |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage, System.Collections.Generic.IReadOnlyDictionary<String, System.Collections.Generic.IEnumerable<String>>, System.Threading.CancellationToken)
Declaration
protected virtual async System.Threading.Tasks.Task<GroupsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpResponseMessage | response | |
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>> | headers | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupsClient.ObjectResponseResult<T>> |
Type Parameters
Name | Description |
---|---|
T |
RenameGroup(String, RenameGroupVM)
Rename group by identifier
Declaration
public virtual GroupVM RenameGroup(string id, RenameGroupVM body)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
RenameGroupVM | body | Model for renaming |
Returns
Type | Description |
---|---|
GroupVM | Succesfully renamed |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RenameGroupAsync(String, RenameGroupVM, System.Threading.CancellationToken)
Rename group by identifier
Declaration
public virtual async System.Threading.Tasks.Task<GroupVM> RenameGroupAsync(string id, RenameGroupVM body, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of group |
RenameGroupVM | body | Model for renaming |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GroupVM> | Succesfully renamed |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdatePermissions(String, UpdateGroupPermissionsVM)
Update permissions
Declaration
public virtual void UpdatePermissions(string id, UpdateGroupPermissionsVM body = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
UpdateGroupPermissionsVM | body |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
UpdatePermissionsAsync(String, UpdateGroupPermissionsVM, System.Threading.CancellationToken)
Update permissions
Declaration
public virtual async System.Threading.Tasks.Task UpdatePermissionsAsync(string id, UpdateGroupPermissionsVM body = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
UpdateGroupPermissionsVM | body | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Permissions are updated |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |