/* * public static List<Person> getPersonsFromId(AccountTwitter account, List<decimal> ids) * { * /* * TweetSharp.ListUserProfilesForOptions options = new TweetSharp.ListUserProfilesForOptions(); * options.UserId = * * List<Person> persons = new List<Person>(); * Person person = new Person(account); * LookupUsersOptions options = new LookupUsersOptions(); * options.UseSSL = true; * options.UserIds = ids; * TwitterResponse<TwitterUserCollection> response = TwitterUser.Lookup(account.Tokens, options); * if (response.Result == RequestResult.Success) * { * foreach (TwitterUser user in response.ResponseObject) * { * persons.Add(TweetSharpConverter.getPersonFromUser(user, account)); * } * } * return persons; * } */ public static List <TweetList> getLists(AccountTwitter account, string username) { ListListsForOptions options = new TweetSharp.ListListsForOptions(); options.ScreenName = username; List <TweetList> Lists = new List <TweetList>(); if (!string.IsNullOrEmpty(username)) { IAsyncResult result = account.twitterService.BeginListListsFor(options); IEnumerable <TwitterList> lists = account.twitterService.EndListListsFor(result); if (lists != null) { foreach (TwitterList list in lists) { Lists.Add(API.TweetSharpConverter.getTweetListFromList(list, account)); } } } else { AppController.Current.Logger.addDebugMessage("getLists called without username provided", "", account: account, type: DebugMessage.DebugMessageTypes.LogMessage); } return(Lists); }
public IEnumerable<dynamic> GetLists(string twitterName) { var service = new TwitterService(CONSUMER_KEY, CONSUMER_SECRET); var expandoList = new List<dynamic>(); var options = new ListListsForOptions(); options.ScreenName = "pparadis"; expandoList = service .ListListsFor(options) .Select(p => ToExpando(p)) .OrderBy(p => p.FullName) .ToList(); return expandoList; }
public virtual void ListListsFor(ListListsForOptions options, Action<IEnumerable<TwitterList>, TwitterResponse> action) { var user_id = options.UserId; var screen_name = options.ScreenName; WithHammock(action, "lists/list", FormatAsString, "?user_id=", user_id, "&screen_name=", screen_name); }
public virtual IAsyncResult BeginListListsFor(ListListsForOptions options) { var user_id = options.UserId; var screen_name = options.ScreenName; return BeginWithHammock<IEnumerable<TwitterList>>(WebMethod.Get, "lists/list", FormatAsString, "?user_id=", user_id, "&screen_name=", screen_name); }
public virtual IEnumerable<TwitterList> ListListsFor(ListListsForOptions options) { var user_id = options.UserId; var screen_name = options.ScreenName; return WithHammock<IEnumerable<TwitterList>>("lists/list", FormatAsString, "?user_id=", user_id, "&screen_name=", screen_name); }
public virtual Task<TwitterResponse<IEnumerable<TwitterList>>> ListListsForAsync(ListListsForOptions options) { var user_id = options.UserId; var screen_name = options.ScreenName; return ExecuteRequest<IEnumerable<TwitterList>>("lists/list", FormatAsString, "?user_id=", user_id, "&screen_name=", screen_name); }
public virtual Task<TwitterAsyncResult<IEnumerable<TwitterList>>> ListListsForAsync(ListListsForOptions options) { var user_id = options.UserId; var screen_name = options.ScreenName; return WithHammockTask<IEnumerable<TwitterList>>(_client, "lists/list", FormatAsString, "?user_id=", user_id, "&screen_name=", screen_name); }