C# Class openhabUWP.Remote.Services.RestService

Inheritance: IRestService
显示文件 Open project: altima/openhabUWP

Public Methods

Method Description
FindLocalServersAsync ( ) : Task

Finds the local servers asynchronous.

IsOpenhab2 ( string serverUrl ) : Task

Determines whether the specified server URL is openhab2.

LoadPageAsync ( string serverUrl, string sitemapName, string pageName ) : Task

Loads the page asynchronous.

LoadSitemapAsync ( string serverUrl, string sitemapName ) : Task

Loads the sitemap asynchronous.

LoadSitemapsAsync ( string serverUrl ) : Task

Loads the sitemaps asynchronous.

Ping ( string url ) : Task

Pings the specified server URL.

PostCommand ( string url, string command ) : Task

Posts the command.

RestService ( IHttpService httpService ) : System
SetAuthentication ( string username, string password ) : void

Private Methods

Method Description
CheckResponseHeaders ( System.Net.Http.Headers.HttpResponseHeaders headers ) : void
Create ( HttpMethod method, string url, string accept = "application/json" ) : HttpRequestMessage
Get ( string url, string accept = "application/json" ) : Task

Gets the specified URL.

Post ( string url, string body ) : Task

Method Details

FindLocalServersAsync() public method

Finds the local servers asynchronous.
public FindLocalServersAsync ( ) : Task
return Task

IsOpenhab2() public method

Determines whether the specified server URL is openhab2.
public IsOpenhab2 ( string serverUrl ) : Task
serverUrl string The server URL.
return Task

LoadPageAsync() public method

Loads the page asynchronous.
public LoadPageAsync ( string serverUrl, string sitemapName, string pageName ) : Task
serverUrl string The server URL.
sitemapName string Name of the sitemap.
pageName string Name of the page.
return Task

LoadSitemapAsync() public method

Loads the sitemap asynchronous.
public LoadSitemapAsync ( string serverUrl, string sitemapName ) : Task
serverUrl string The server URL.
sitemapName string Name of the sitemap.
return Task

LoadSitemapsAsync() public method

Loads the sitemaps asynchronous.
public LoadSitemapsAsync ( string serverUrl ) : Task
serverUrl string The server URL.
return Task

Ping() public method

Pings the specified server URL.
public Ping ( string url ) : Task
url string The server URL.
return Task

PostCommand() public method

Posts the command.
public PostCommand ( string url, string command ) : Task
url string The URL.
command string The command.
return Task

RestService() public method

public RestService ( IHttpService httpService ) : System
httpService IHttpService
return System

SetAuthentication() public method

public SetAuthentication ( string username, string password ) : void
username string
password string
return void