C# 클래스 Particle.ParticleCloud

Represents the connection to the particle cloud.
상속: ParticleBase, IDisposable
파일 보기 프로젝트 열기: ParticleNET/ParticleSDK 1 사용 예제들

공개 메소드들

메소드 설명
ClaimDeviceAsync ( String deviceId ) : Task

Claims the specified device for the logged in user

Dispose ( ) : void

Releases unmanaged and - optionally - managed resources mainly the underlining HttpClient

GetDevicesAsync ( ) : Task>>

Get the list of devices the user has access to

LoginWithUserAsync ( String username, String password, int expiresIn = 3600 ) : Task

Logs into ParticleCloud with the given username and password

Logout ( ) : void

Logs the user out locally

MakeDeleteRequestAsync ( String method ) : Task

Makes the delete request asynchronous to the particle cloud

MakeDeleteRequestWithAuthTestAsync ( String method ) : Task

Calls MakeDeleteRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again

MakeGetRequestAsync ( String method ) : Task

Makes the get request asynchronous to the cloud api

MakeGetRequestWithAuthTestAsync ( String method ) : Task

Calls MakeGetRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again

MakePostRequestAsync ( String method ) : Task

Makes the post request asynchronous to the particle cloud

MakePostRequestWithAuthTestAsync ( String method ) : Task

Calls MakePostRequestAsync(string, KeyValuePair{string, string}[]) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again

MakePostRequestWithoutAuthAsync ( String method ) : Task

Makes the post request without authentication asynchronous to the particle cloud.

MakePutRequestAsync ( String method ) : Task

Makes the put request asynchronous to the particle cloud

MakePutRequestWithAuthTestAsync ( String method ) : Task

Calls MakePutRequestAsync(string, KeyValuePair{string, string}[]) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again

ParticleCloud ( ) : Newtonsoft.Json

Initializes a new instance of the ParticleCloud class using the default url https://api.particle.io/v1/

ParticleCloud ( Uri baseUri ) : Newtonsoft.Json

Initializes a new instance of the ParticleCloud class.

RefreshTokenAsync ( ) : Task

Refreshes the access token asynchronous.

RequestPasswordResetAsync ( String email ) : Task

Requests the password be reset.

SignupWithUserAsync ( String username, String password ) : Task

Sign up with new account credentials to Particle cloud

메소드 상세

ClaimDeviceAsync() 공개 메소드

Claims the specified device for the logged in user
public ClaimDeviceAsync ( String deviceId ) : Task
deviceId String The id of the new device
리턴 Task

Dispose() 공개 메소드

Releases unmanaged and - optionally - managed resources mainly the underlining HttpClient
public Dispose ( ) : void
리턴 void

GetDevicesAsync() 공개 메소드

Get the list of devices the user has access to
public GetDevicesAsync ( ) : Task>>
리턴 Task>>

LoginWithUserAsync() 공개 메소드

Logs into ParticleCloud with the given username and password
public LoginWithUserAsync ( String username, String password, int expiresIn = 3600 ) : Task
username String The Particle account username
password String The Particle account password
expiresIn int How many seconds the token will be valid for. 0 means forever. Short lived tokens are better for security.
리턴 Task

Logout() 공개 메소드

Logs the user out locally
public Logout ( ) : void
리턴 void

MakeDeleteRequestAsync() 공개 메소드

Makes the delete request asynchronous to the particle cloud
public MakeDeleteRequestAsync ( String method ) : Task
method String The method.
리턴 Task

MakeDeleteRequestWithAuthTestAsync() 공개 메소드

Calls MakeDeleteRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakeDeleteRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
리턴 Task

MakeGetRequestAsync() 공개 메소드

Makes the get request asynchronous to the cloud api
public MakeGetRequestAsync ( String method ) : Task
method String The method to call i.e. devices
리턴 Task

MakeGetRequestWithAuthTestAsync() 공개 메소드

Calls MakeGetRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakeGetRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
리턴 Task

MakePostRequestAsync() 공개 메소드

Makes the post request asynchronous to the particle cloud
public MakePostRequestAsync ( String method ) : Task
method String The method to call
리턴 Task

MakePostRequestWithAuthTestAsync() 공개 메소드

Calls MakePostRequestAsync(string, KeyValuePair{string, string}[]) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakePostRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
리턴 Task

MakePostRequestWithoutAuthAsync() 공개 메소드

Makes the post request without authentication asynchronous to the particle cloud.
public MakePostRequestWithoutAuthAsync ( String method ) : Task
method String The method.
리턴 Task

MakePutRequestAsync() 공개 메소드

Makes the put request asynchronous to the particle cloud
public MakePutRequestAsync ( String method ) : Task
method String The method to call
리턴 Task

MakePutRequestWithAuthTestAsync() 공개 메소드

Calls MakePutRequestAsync(string, KeyValuePair{string, string}[]) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakePutRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
리턴 Task

ParticleCloud() 공개 메소드

Initializes a new instance of the ParticleCloud class using the default url https://api.particle.io/v1/
public ParticleCloud ( ) : Newtonsoft.Json
리턴 Newtonsoft.Json

ParticleCloud() 공개 메소드

Initializes a new instance of the ParticleCloud class.
public ParticleCloud ( Uri baseUri ) : Newtonsoft.Json
baseUri System.Uri The url to the particle sdk i.e. https://api.particle.io/v1/
리턴 Newtonsoft.Json

RefreshTokenAsync() 공개 메소드

Refreshes the access token asynchronous.
public RefreshTokenAsync ( ) : Task
리턴 Task

RequestPasswordResetAsync() 공개 메소드

Requests the password be reset.
public RequestPasswordResetAsync ( String email ) : Task
email String The email.
리턴 Task

SignupWithUserAsync() 공개 메소드

Sign up with new account credentials to Particle cloud
public SignupWithUserAsync ( String username, String password ) : Task
username String Required user name, must be a valid email address
password String Required password
리턴 Task