https://github.com/aneeshd16/loklakdotnet
.NET API wrapper for the Loklak server http://loklak.org
https://github.com/aneeshd16/loklakdotnet
Last synced: 2 months ago
JSON representation
.NET API wrapper for the Loklak server http://loklak.org
- Host: GitHub
- URL: https://github.com/aneeshd16/loklakdotnet
- Owner: aneeshd16
- Created: 2016-02-09T20:09:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-01T17:54:39.000Z (over 10 years ago)
- Last Synced: 2025-01-14T02:30:33.061Z (over 1 year ago)
- Language: C#
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LoklakDotNet
## Development discontinued on this repo. Go to (https://github.com/loklak/LoklakDotNet)
This is the .NET API wrapper for the Loklak server (http://loklak.org).
##Installation
To install LoklakDotNet, run the following command in the Package Manager Console.
`Install-Package LoklakDotNet`
You can also search for `loklak` in the Nuget Package Manager.
##How to use
See the LoklakDotNetTests project for usage examples. async/await pattern is followed. All methods output the raw JSON string response. Parse the JSON using a JSON parser of your choice. Examples in LoklakDotNetTests use Newtonsoft.JSON.
For documentation on the API, go [here](http://loklak.org/api.html).
###Initialize
`Loklak loklak = new Loklak();` or `Loklak loklak = new Loklak("http://myloklakapp/api");`
###Status
`var result = await loklak.status();`
###Search
```
var st = new LoklakSearchTerm(); //See LoklakSearchTerm properties for more options
st.terms = "loklak";
var result = await loklak.search(st);
```
Full method signature:
`search(LoklakSearchTerm q, int count = 100, string source="cache", IList fields = null, int limit=-1, int timeZoneOffset=-1)`
###Hello
`var result = await loklak.hello();`
###Peers
`var result = await loklak.peers();`
###Geocode
```
var places = new List();
places.Add("Delhi");
places.Add("Berlin");
var result = await loklak.geocode(places);
```
###User
`var result = await loklak.user("loklak_app", , );`