From 4e911eb53c326b960480f2bd03e5974e9ead47b0 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Wed, 26 Nov 2014 22:03:05 +0100 Subject: [PATCH] docs for mixes + opml + preferences --- FeedlySharp/Endpoints/Categories.cs | 3 --- FeedlySharp/Endpoints/Markers.cs | 2 -- FeedlySharp/Endpoints/Mixes.cs | 13 +++++++++++++ FeedlySharp/Endpoints/OPML.cs | 18 ++++++++++++++---- FeedlySharp/Endpoints/Preferences.cs | 20 ++++++++++++++++---- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/FeedlySharp/Endpoints/Categories.cs b/FeedlySharp/Endpoints/Categories.cs index 59a2f2e..a29e647 100644 --- a/FeedlySharp/Endpoints/Categories.cs +++ b/FeedlySharp/Endpoints/Categories.cs @@ -11,7 +11,6 @@ namespace FeedlySharp { /// /// Returns all categories created by the user. - /// Authentication required. /// /// categories-endpoint (https://developer.feedly.com/v3/categories/#get-the-list-of-all-categories) /// The cancellation token. @@ -23,7 +22,6 @@ namespace FeedlySharp /// /// Renames a user category. - /// Authentication required. /// /// categories-endpoint (https://developer.feedly.com/v3/categories/#change-the-label-of-an-existing-category) /// The category id. @@ -37,7 +35,6 @@ namespace FeedlySharp /// /// Deletes a user category. - /// Authentication required. /// /// categories-endpoint (https://developer.feedly.com/v3/categories/#delete-a-category) /// The category id. diff --git a/FeedlySharp/Endpoints/Markers.cs b/FeedlySharp/Endpoints/Markers.cs index 915f0c4..f1c07ce 100644 --- a/FeedlySharp/Endpoints/Markers.cs +++ b/FeedlySharp/Endpoints/Markers.cs @@ -1,12 +1,10 @@ using FeedlySharp.Models; using System; using System.Collections.Generic; -using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using System.Linq; -using System.Dynamic; namespace FeedlySharp { diff --git a/FeedlySharp/Endpoints/Mixes.cs b/FeedlySharp/Endpoints/Mixes.cs index f618612..b549394 100644 --- a/FeedlySharp/Endpoints/Mixes.cs +++ b/FeedlySharp/Endpoints/Mixes.cs @@ -9,6 +9,19 @@ namespace FeedlySharp { public partial class FeedlyClient { + /// + /// Get a mix of the most engaging content available in a stream. + /// + /// mixes-endpoint (https://developer.feedly.com/v3/mixes/#get-a-mix-of-the-most-engaging-content-available-in-a-stream) + /// A feed id, a category id, the system category ids or a topic id. + /// Number of entry ids to return. default is 3. max is 20. + /// if set to true [return unread content only]. + /// Hour of the day. Used for same day optimization: only articles published in the past n hours will be used. This is a more convenient parameter than “newerThan”; both parameters should not be passed in the same request. + /// Date from where to fetch the data. + /// If “hours” is provided, and there aren’t enough articles to match the entry count requested, the server will look back in time to find more articles. Articles from the first n hours will be returned first. + /// The cancellation token. + /// + /// It is not possible to use both newerThan and limitHours public async Task> GetMixes( string contentId, int? count = null, diff --git a/FeedlySharp/Endpoints/OPML.cs b/FeedlySharp/Endpoints/OPML.cs index dc24bd6..92ae59a 100644 --- a/FeedlySharp/Endpoints/OPML.cs +++ b/FeedlySharp/Endpoints/OPML.cs @@ -1,7 +1,4 @@ -using FeedlySharp.Models; -using System; -using System.Collections.Generic; -using System.Net; +using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -10,12 +7,25 @@ namespace FeedlySharp { public partial class FeedlyClient { + /// + /// Export the user's subscriptions as an OPML file. + /// + /// OPML-endpoint (https://developer.feedly.com/v3/opml/#export-the-users-subscriptions-as-an-opml-file) + /// The cancellation token. + /// public async Task GetOPML(CancellationToken cancellationToken = default(CancellationToken)) { return await Client.Request(HttpMethod.Get, "v3/opml", null, false, true, cancellationToken); } + /// + /// Import an OPML. + /// + /// OPML-endpoint (https://developer.feedly.com/v3/opml/#import-an-opml) + /// The OPML input. + /// The cancellation token. + /// public async Task ImportOPML(string opml, CancellationToken cancellationToken = default(CancellationToken)) { HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "v3/opml"); diff --git a/FeedlySharp/Endpoints/Preferences.cs b/FeedlySharp/Endpoints/Preferences.cs index 862ead7..8083d91 100644 --- a/FeedlySharp/Endpoints/Preferences.cs +++ b/FeedlySharp/Endpoints/Preferences.cs @@ -1,7 +1,4 @@ -using FeedlySharp.Models; -using System; -using System.Collections.Generic; -using System.Net; +using System.Collections.Generic; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -10,12 +7,27 @@ namespace FeedlySharp { public partial class FeedlyClient { + /// + /// Get the preferences of the user. + /// Applications can store and sync some user preferences. For example, Feedly stores the views users assign to each category and feed in the preferences module. Preferences are application specific - applications can not share preferences. + /// An application can save up to 10,000 preference knobs per user. + /// + /// preferences-endpoint (https://developer.feedly.com/v3/preferences/#get-the-preferences-of-the-user) + /// The cancellation token. + /// A string dictionary, as the preferences list is dynamic and different for every application. public async Task> GetPreferences(CancellationToken cancellationToken = default(CancellationToken)) { return (await Client.Request>(HttpMethod.Get, "v3/preferences", null, false, true, cancellationToken)) ?? new Dictionary(); } + /// + /// Update the preferences of the user. + /// + /// preferences-endpoint (https://developer.feedly.com/v3/preferences/#update-the-preferences-of-the-user) + /// The new or updated preferences. If you wish to delete a key, you can pass the special value "==DELETE==". + /// The cancellation token. + /// A string dictionary, as the preferences list is dynamic and different for every application. public async Task> UpdatePreferences(Dictionary preferences, CancellationToken cancellationToken = default(CancellationToken)) { return (await Client.Request>(HttpMethod.Post, "v3/preferences", preferences, true, true, cancellationToken)) ?? new Dictionary();