Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.
Mark Junker edited this page Jan 15, 2015 · 7 revisions

Overview

RestSharp.Portable is a portable library with classes similar to RestSharp.

License

[BSD 2-Clause License](BSD 2-Clause License)

Features

  • Portable
  • Async API
  • API very similar to RestSharp
  • Configurable content encoding support
  • OAuth 1.0 support
  • OAuth 2.0 support

Supported platforms

  • .NET Framework 4
  • .NET for Windows Store apps
  • .NET Native
  • Windows Phone 8
  • Silverlight 5
  • Xamarin.Android
  • Xamarin.MonoTouch (old API)
  • Xamarin.iOS
  • Portable Class Libraries

Roadmap

  • Support for SOCKS proxies is in the works
  • More ideas and pull requests are welcome :)

Dependencies

Core library

Encodings

OAuth 1.0

Small example

The following is an example to get the ticker from the bitstamp.net website.

The result class

public class TickerResult
{
    public decimal Last { get; set; }
    public decimal High { get; set; }
    public decimal Low { get; set; }
    public decimal Volume { get; set; }
    public decimal Bid { get; set; }
    public decimal Ask { get; set; }
}

We use the class with:

using (var client = new RestClient(new Uri("https://www.bitstamp.net/api/"))) {
    var request = new RestRequest("ticker", HttpMethod.Get);
    var result = await client.Execute<TickerResult>(request);
}