new Dictionary<string, string> {
{ "screen_name", "twitterapi" },
{ "cursor", "-1" },
+ { "count", "100" },
},
"/lists/ownerships")
)
twitterApi.apiConnection = mock.Object;
- await twitterApi.ListsOwnerships("twitterapi", cursor: -1L)
+ await twitterApi.ListsOwnerships("twitterapi", cursor: -1L, count: 100)
.ConfigureAwait(false);
mock.VerifyAll();
new Dictionary<string, string> {
{ "screen_name", "twitterapi" },
{ "cursor", "-1" },
+ { "count", "100" },
},
"/lists/subscriptions")
)
twitterApi.apiConnection = mock.Object;
- await twitterApi.ListsSubscriptions("twitterapi", cursor: -1L)
+ await twitterApi.ListsSubscriptions("twitterapi", cursor: -1L, count: 100)
.ConfigureAwait(false);
mock.VerifyAll();
return this.apiConnection.GetAsync<TwitterSearchResult>(endpoint, param, "/search/tweets");
}
- public Task<TwitterLists> ListsOwnerships(string screenName, long? cursor = null)
+ public Task<TwitterLists> ListsOwnerships(string screenName, long? cursor = null, int? count = null)
{
var endpoint = new Uri("lists/ownerships.json", UriKind.Relative);
var param = new Dictionary<string, string>
if (cursor != null)
param["cursor"] = cursor.ToString();
+ if (count != null)
+ param["count"] = count.ToString();
return this.apiConnection.GetAsync<TwitterLists>(endpoint, param, "/lists/ownerships");
}
- public Task<TwitterLists> ListsSubscriptions(string screenName, long? cursor = null)
+ public Task<TwitterLists> ListsSubscriptions(string screenName, long? cursor = null, int? count = null)
{
var endpoint = new Uri("lists/subscriptions.json", UriKind.Relative);
var param = new Dictionary<string, string>
if (cursor != null)
param["cursor"] = cursor.ToString();
+ if (count != null)
+ param["count"] = count.ToString();
return this.apiConnection.GetAsync<TwitterLists>(endpoint, param, "/lists/subscriptions");
}
更新履歴
==== Ver 1.3.5-dev(2016/xx/xx)
+ * CHG: リストの一覧を表示する際に20件を越える場合のAPIリクエスト回数が少なくなりました
* FIX: UserStreamsが正常に動作しないことがある不具合を修正
* FIX: 「このユーザーへの@発言を検索」がv1.3.3から機能しなくなっていた不具合を修正
* FIX: プロフィール画像のキャッシュ参照時にエラーが発生する不具合を修正
{
this.CheckAccountState();
- var ownedLists = await TwitterLists.GetAllItemsAsync(x => this.Api.ListsOwnerships(this.Username, cursor: x))
- .ConfigureAwait(false);
+ var ownedLists = await TwitterLists.GetAllItemsAsync(x =>
+ this.Api.ListsOwnerships(this.Username, cursor: x, count: 1000))
+ .ConfigureAwait(false);
- var subscribedLists = await TwitterLists.GetAllItemsAsync(x => this.Api.ListsSubscriptions(this.Username, cursor: x))
- .ConfigureAwait(false);
+ var subscribedLists = await TwitterLists.GetAllItemsAsync(x =>
+ this.Api.ListsSubscriptions(this.Username, cursor: x, count: 1000))
+ .ConfigureAwait(false);
TabInformations.GetInstance().SubscribableLists = Enumerable.Concat(ownedLists, subscribedLists)
.Select(x => new ListElement(x, this))