C# Class LoklakDotNet.Loklak

ファイルを表示 Open project: loklak/loklak_dotnet_wrapper Class Usage Examples

Public Methods

Method Description
Loklak ( String apiUrl = "http://loklak.org/api/" ) : System

Initializes the Loklak API wrapper

geocode ( IList places ) : Task

This servlet provides geocoding of place names to location coordinates and also reverse geocoding of location coordinates to place names.

hello ( ) : Task

The hello servlet is part of the loklak peer-to-peer bootstrap process and shall be used to announce that a new client has been started up. The hello request is done automatically after a loklak startup against the loklak backend as configured in the settings in field backend. The back-end server then does not return any data, just an 'ok' string object.

markdown ( string text, String color_text = "", String color_background = "", int padding, bool uppercase = true ) : Task

This servlet provides an image with text on it.

peers ( ) : Task

This servlet combined the result of the hello calls from all peers and provides a list of addresses where the remote peers can be accessed.

search ( LoklakSearchTerm q, int count = 100, string source = "cache", IList fields = null, int limit = -1, int timeZoneOffset = -1 ) : Task

Get a search result from the server

status ( ) : Task

The status servlet shows the size of the internal Elasticsearch search index for messages and users. Furthermore, the servlet reflects the current browser clients settings in the client_info.

user ( string screen_name, int follower_count, int following_count ) : Task

This servlet provides the retrieval of user followers and the accounts which the user is following.

Private Methods

Method Description
ProcessUrlAsync ( string method, string>.Dictionary parameters = null ) : Task

Method Details

Loklak() public method

Initializes the Loklak API wrapper
public Loklak ( String apiUrl = "http://loklak.org/api/" ) : System
apiUrl String Optional API Url
return System

geocode() public method

This servlet provides geocoding of place names to location coordinates and also reverse geocoding of location coordinates to place names.
public geocode ( IList places ) : Task
places IList List of place names
return Task

hello() public method

The hello servlet is part of the loklak peer-to-peer bootstrap process and shall be used to announce that a new client has been started up. The hello request is done automatically after a loklak startup against the loklak backend as configured in the settings in field backend. The back-end server then does not return any data, just an 'ok' string object.
public hello ( ) : Task
return Task

markdown() public method

This servlet provides an image with text on it.
public markdown ( string text, String color_text = "", String color_background = "", int padding, bool uppercase = true ) : Task
text string text to be printed, markdown possible
color_text String text color
color_background String background color
padding int space around text
uppercase bool
return Task

peers() public method

This servlet combined the result of the hello calls from all peers and provides a list of addresses where the remote peers can be accessed.
public peers ( ) : Task
return Task

search() public method

Get a search result from the server
public search ( LoklakSearchTerm q, int count = 100, string source = "cache", IList fields = null, int limit = -1, int timeZoneOffset = -1 ) : Task
q LoklakSearchTerm query term
count int the wanted number of results
source string the source for the search cache|backend|twitter|all
fields IList aggregation fields for search facets
limit int a limitation of number of facets for each aggregation
timeZoneOffset int offset applied on since:, until: and the date histogram
return Task

status() public method

The status servlet shows the size of the internal Elasticsearch search index for messages and users. Furthermore, the servlet reflects the current browser clients settings in the client_info.
public status ( ) : Task
return Task

user() public method

This servlet provides the retrieval of user followers and the accounts which the user is following.
public user ( string screen_name, int follower_count, int following_count ) : Task
screen_name string The screen name of the Twitter user without "@"
follower_count int The maximum number of follower profiles to be fetched
following_count int The maximum number of following profiles to be fetched
return Task