trending methods do not require a GUID
This commit is contained in:
@@ -12,7 +12,6 @@ namespace PocketSharp
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get trending articles on Pocket.
|
/// Get trending articles on Pocket.
|
||||||
/// Requires an active GUID from GetGuid() and will therefore make two HTTP requests.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="count">Article count.</param>
|
/// <param name="count">Article count.</param>
|
||||||
/// <param name="languageCode">Two-letter language code for language-specific results.</param>
|
/// <param name="languageCode">Two-letter language code for language-specific results.</param>
|
||||||
@@ -21,11 +20,8 @@ namespace PocketSharp
|
|||||||
/// <exception cref="PocketException"></exception>
|
/// <exception cref="PocketException"></exception>
|
||||||
public async Task<IEnumerable<PocketItem>> GetTrendingArticles(int count = 20, string languageCode = "en", CancellationToken cancellationToken = default(CancellationToken))
|
public async Task<IEnumerable<PocketItem>> GetTrendingArticles(int count = 20, string languageCode = "en", CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
string guid = await GetGuid(cancellationToken);
|
|
||||||
|
|
||||||
return (await Request<Retrieve>("getGlobalRecs", cancellationToken, new Dictionary<string, string>()
|
return (await Request<Retrieve>("getGlobalRecs", cancellationToken, new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
{ "guid", guid },
|
|
||||||
{ "locale_lang", languageCode },
|
{ "locale_lang", languageCode },
|
||||||
{ "count", count.ToString() },
|
{ "count", count.ToString() },
|
||||||
{ "version", "2" }
|
{ "version", "2" }
|
||||||
@@ -35,7 +31,6 @@ namespace PocketSharp
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get trending topics on Pocket.
|
/// Get trending topics on Pocket.
|
||||||
/// Requires an active GUID from GetGuid() and will therefore make two HTTP requests.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="languageCode">Two-letter language code for language-specific results.</param>
|
/// <param name="languageCode">Two-letter language code for language-specific results.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
@@ -43,11 +38,8 @@ namespace PocketSharp
|
|||||||
/// <exception cref="PocketException"></exception>
|
/// <exception cref="PocketException"></exception>
|
||||||
public async Task<IEnumerable<PocketTopic>> GetTrendingTopics(string languageCode = "en", CancellationToken cancellationToken = default(CancellationToken))
|
public async Task<IEnumerable<PocketTopic>> GetTrendingTopics(string languageCode = "en", CancellationToken cancellationToken = default(CancellationToken))
|
||||||
{
|
{
|
||||||
string guid = await GetGuid(cancellationToken);
|
|
||||||
|
|
||||||
return (await Request<TopicsResponse>("getTrendingTopics", cancellationToken, new Dictionary<string, string>()
|
return (await Request<TopicsResponse>("getTrendingTopics", cancellationToken, new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
{ "guid", guid },
|
|
||||||
{ "locale_lang", languageCode },
|
{ "locale_lang", languageCode },
|
||||||
{ "version", "2" }
|
{ "version", "2" }
|
||||||
}, false)).Items ?? new List<PocketTopic>();
|
}, false)).Items ?? new List<PocketTopic>();
|
||||||
|
|||||||
Reference in New Issue
Block a user