Hi,
I've been playing with RestSharp and so far, it seems pretty awesome.
I've managed to get a simple example running for just pulling my own
statuses from twitter.
var statuses = new List<Status>();
const string consumerKey = "...";
const string consumerSecret = "...";
const string accessKey = "...";
const string accessSecret = "...";
var baseUrl = "
http://api.twitter.com";
var client = new RestClient(baseUrl);
client.Authenticator =
OAuth1Authenticator.ForProtectedResource(
consumerKey, consumerSecret, accessKey, accessSecret
);
var request = new RestRequest("/1/statuses/
user_timeline.json", Method.GET);
var response = client.Execute<List<Status>>(request);
if ( response != null )
{
statuses = response.Data;
}
return statuses;
This works great.
My aim is to create single web app (MVC3) that pulls in data from my
own accounts using the APIs at Twitter, Soundcloud and Flickr
(possibly a few others). Is there a simple way of accessing the APIs
Soundcloud and Flickr using RestSharp without having to do the "oAuth
Dance"? I'm not making an app that will be used by others, it'll be
basically read-only of my statuses, comments, photos etc. I just want
to login silently as me on my server and use the apis.
Am I overlooking something here? I'm aware of the twitter // netflix
examples in the unit tests. However both of these, require a
breakpoint to grab the verification key. Ideally I want to avoid
this.
Thanks in advance