C# 클래스 RingCentral.Platform

파일 보기 프로젝트 열기: ringcentral/ringcentral-csharp 1 사용 예제들

공개 메소드들

메소드 설명
Authenticate ( string authCode, string redirectUri ) : ApiResponse

Do authentication with the authorization code returned from server

AuthorizeUri ( string redirectUri, string state = "" ) : string

When your application needs to authentiate an user, redirect the user to RingCentral API server for authentication. This method helps you to build the URI. Later you can redirect user to this URI.

Delete ( Request request ) : ApiResponse
Get ( Request request ) : ApiResponse
LoggedIn ( ) : bool

Determines if Access is valid and returns the boolean result. If access is not valid but refresh token is valid then a refresh is issued.

Login ( string username, string extension, string password, bool remember ) : ApiResponse

Method to generate Access Token to establish an authenticated session

Logout ( ) : ApiResponse

Revokes the already granted access to stop application activity

Platform ( string appKey, string appSecret, string serverUrl, string appName = "", string appVersion = "" ) : System
Post ( Request request ) : ApiResponse
Put ( Request request ) : ApiResponse
Refresh ( ) : ApiResponse

Refreshes expired Access token during valid lifetime of Refresh Token

Send ( HttpMethod httpMethod, Request request ) : ApiResponse

비공개 메소드들

메소드 설명
AuthCall ( Request request ) : ApiResponse

Authentication, Refresh and Revoke requests all require an Authentication Header Value of "Basic". This is a special method to handle those requests.

GenerateAuthToken ( ) : string

Generates auth token by encoding appKey and appSecret then converting it to base64

SetUserAgentHeader ( string appName, string appVersion ) : void

You also may supply custom AppName:AppVersion in the form of a header with your application codename and version. These parameters are optional but they will help a lot to identify your application in API logs and speed up any potential troubleshooting. Allowed characters for AppName:AppVersion are- letters, digits, hyphen, dot and underscore.

메소드 상세

Authenticate() 공개 메소드

Do authentication with the authorization code returned from server
public Authenticate ( string authCode, string redirectUri ) : ApiResponse
authCode string The authorization code returned from server
redirectUri string The same redirectUri when you were obtaining the authCode in previous step
리턴 RingCentral.Http.ApiResponse

AuthorizeUri() 공개 메소드

When your application needs to authentiate an user, redirect the user to RingCentral API server for authentication. This method helps you to build the URI. Later you can redirect user to this URI.
public AuthorizeUri ( string redirectUri, string state = "" ) : string
redirectUri string This is a callback URI which determines where the response will be sent to. The value of this parameter must exactly match one of the URIs you have provided for your app upon registration. This URI can be HTTP/HTTPS address for web applications or custom scheme URI for mobile or desktop applications.
state string Optional, recommended. An opaque value used by the client to maintain state between the request and callback. The authorization server includes this value when redirecting the user-agent back to the client. The parameter should be used for preventing cross-site request forgery
리턴 string

Delete() 공개 메소드

public Delete ( Request request ) : ApiResponse
request RingCentral.Http.Request
리턴 RingCentral.Http.ApiResponse

Get() 공개 메소드

public Get ( Request request ) : ApiResponse
request RingCentral.Http.Request
리턴 RingCentral.Http.ApiResponse

LoggedIn() 공개 메소드

Determines if Access is valid and returns the boolean result. If access is not valid but refresh token is valid then a refresh is issued.
public LoggedIn ( ) : bool
리턴 bool

Login() 공개 메소드

Method to generate Access Token to establish an authenticated session
public Login ( string username, string extension, string password, bool remember ) : ApiResponse
username string Username of RingCentral user
extension string Optional: Extension number to login
password string Password of the RingCentral User
remember bool If set to true, refresh token TTL will be one week, otherwise it's 10 hours
리턴 RingCentral.Http.ApiResponse

Logout() 공개 메소드

Revokes the already granted access to stop application activity
public Logout ( ) : ApiResponse
리턴 RingCentral.Http.ApiResponse

Platform() 공개 메소드

public Platform ( string appKey, string appSecret, string serverUrl, string appName = "", string appVersion = "" ) : System
appKey string
appSecret string
serverUrl string
appName string
appVersion string
리턴 System

Post() 공개 메소드

public Post ( Request request ) : ApiResponse
request RingCentral.Http.Request
리턴 RingCentral.Http.ApiResponse

Put() 공개 메소드

public Put ( Request request ) : ApiResponse
request RingCentral.Http.Request
리턴 RingCentral.Http.ApiResponse

Refresh() 공개 메소드

Refreshes expired Access token during valid lifetime of Refresh Token
public Refresh ( ) : ApiResponse
리턴 RingCentral.Http.ApiResponse

Send() 공개 메소드

public Send ( HttpMethod httpMethod, Request request ) : ApiResponse
httpMethod HttpMethod
request RingCentral.Http.Request
리턴 RingCentral.Http.ApiResponse