Class Client
Cloud api client. Login should be done before calling any other endpoint.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Cloud.API
Assembly: Simplic.Cloud.API.dll
Syntax
public class Client : ClientBase, IDisposable, IClient
Constructors
| Improve this Doc View SourceClient()
Initialize new client.
Declaration
public Client()
Client(IClient)
Initialize client and inherit the authentication
Declaration
public Client(IClient client)
Parameters
Type | Name | Description |
---|---|---|
IClient | client | Client instance |
Client(String)
Initialize client with different url. DefaultUrl
Declaration
public Client(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | Unique url |
Methods
| Improve this Doc View SourceLoginAsync(String, String)
Login into the a user account. The session will be stored in the current client instance.
Declaration
public async Task<User> LoginAsync(string email, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | User account mail address |
|
System.String | password | User account password |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<User> | Instance of User if login was successful |
Exceptions
Type | Condition |
---|---|
ApiException | If the login process fails |
PingAsync()
Echo/ping simplic cloud service
Declaration
public async Task<EchoResponse> PingAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<EchoResponse> | Instance of User if login was successful |
Exceptions
Type | Condition |
---|---|
ApiException | If the login process fails |
Implements
System.IDisposable