Esempio n. 1
0
		private static IObservable<List> ShowListCore(OAuthClient client, string endpoint, UserId ownerId)
		{
			return Observable
				.Defer(() => client.GetResponseText())
				.Select(json => List.Parse(json, ownerId))
				.OnErrorRetry(3)
				.WriteLine(endpoint, list => list.FullName);
		}
Esempio n. 2
0
 public override IObservable<bool> Scrap(string url, string title = null, long? sourceTweetId = null)
 {
     var client = new OAuthClient(consumerKey, consumerSecret,
         new AccessToken(userToken, userSecret));
     client.Url = "https://www.readability.com/api/rest/v1/bookmarks";
     var param = new ParameterCollection();
     param.Add("url", HttpUtility.UrlEncode(url));
     client.Parameters = param;
     client.MethodType = MethodType.Post;
     return client.GetResponseText()
         .Select(_ => true);
 }