C# Class Sequencing.WeatherApp.Controllers.AppChain.SqApiServiceFacade

SqApiServiceFacade class is responsible for calling SQAPI operations (including app-chain creation, querying statuses and getting results
Show file Open project: SequencingDOTcom/Weather-My-Way-RTP-app Class Usage Examples

Public Methods

Method Description
CheckAppChainStatus ( long idJob ) : string

Checks executing app chain status

GetAppChainResults ( long idJob ) : AppResultsHolder

Returns results of executed app chain

SendUserNotification ( string msg ) : void

Sends user onsite notification

SqApiServiceFacade ( string url ) : System
SqApiServiceFacade ( string apiUrl, string userName ) : System
StartAppChain ( string appCode, string>.Dictionary pars ) : StartAppRs

Starts app-chain

Private Methods

Method Description
CreateClient ( ) : RestSharp.RestClient
CreateRq ( string opName, Method method ) : RestRequest
RunRq ( RestSharp.RestClient _restClient, RestRequest _restRequest ) : IRestResponse

Runs requests, is executed several times in case of error - request is attempted with refreshed auth data

Method Details

CheckAppChainStatus() public method

Checks executing app chain status
public CheckAppChainStatus ( long idJob ) : string
idJob long app chain job id
return string

GetAppChainResults() public method

Returns results of executed app chain
public GetAppChainResults ( long idJob ) : AppResultsHolder
idJob long app chain job id
return AppResultsHolder

SendUserNotification() public method

Sends user onsite notification
public SendUserNotification ( string msg ) : void
msg string message to user
return void

SqApiServiceFacade() public method

public SqApiServiceFacade ( string url ) : System
url string
return System

SqApiServiceFacade() public method

public SqApiServiceFacade ( string apiUrl, string userName ) : System
apiUrl string
userName string
return System

StartAppChain() public method

Starts app-chain
public StartAppChain ( string appCode, string>.Dictionary pars ) : StartAppRs
appCode string code of app-chain
pars string>.Dictionary app-chain parameters
return StartAppRs