feedlr 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +22 -0
  5. data/.yardopts +5 -0
  6. data/Gemfile +32 -0
  7. data/Guardfile +7 -0
  8. data/LICENSE.md +16 -0
  9. data/README.md +85 -0
  10. data/Rakefile +10 -0
  11. data/feedlr.gemspec +27 -0
  12. data/lib/feedlr.rb +34 -0
  13. data/lib/feedlr/base.rb +4 -0
  14. data/lib/feedlr/client.rb +60 -0
  15. data/lib/feedlr/collection.rb +15 -0
  16. data/lib/feedlr/error.rb +79 -0
  17. data/lib/feedlr/gateway/categories.rb +36 -0
  18. data/lib/feedlr/gateway/entries.rb +40 -0
  19. data/lib/feedlr/gateway/evernote.rb +37 -0
  20. data/lib/feedlr/gateway/facebook.rb +28 -0
  21. data/lib/feedlr/gateway/feeds.rb +26 -0
  22. data/lib/feedlr/gateway/markers.rb +195 -0
  23. data/lib/feedlr/gateway/microsoft.rb +30 -0
  24. data/lib/feedlr/gateway/mixes.rb +29 -0
  25. data/lib/feedlr/gateway/opml.rb +26 -0
  26. data/lib/feedlr/gateway/preferences.rb +25 -0
  27. data/lib/feedlr/gateway/profile.rb +25 -0
  28. data/lib/feedlr/gateway/search.rb +41 -0
  29. data/lib/feedlr/gateway/shorten.rb +17 -0
  30. data/lib/feedlr/gateway/streams.rb +42 -0
  31. data/lib/feedlr/gateway/subscriptions.rb +43 -0
  32. data/lib/feedlr/gateway/tags.rb +88 -0
  33. data/lib/feedlr/gateway/topics.rb +43 -0
  34. data/lib/feedlr/gateway/twitter.rb +29 -0
  35. data/lib/feedlr/mapper.rb +25 -0
  36. data/lib/feedlr/rate_limit.rb +21 -0
  37. data/lib/feedlr/request.rb +148 -0
  38. data/lib/feedlr/success.rb +5 -0
  39. data/lib/feedlr/version.rb +15 -0
  40. data/spec/cassettes/Feedlr_Gateway_Categories/_change_category_label/resoponds_with_hashie_object.yml +50 -0
  41. data/spec/cassettes/Feedlr_Gateway_Categories/_delete_category/resoponds_with_hashie_object.yml +50 -0
  42. data/spec/cassettes/Feedlr_Gateway_Categories/_user_categories/resoponds_with_hashie_object.yml +52 -0
  43. data/spec/cassettes/Feedlr_Gateway_Entries/_add_entry/resoponds_with_hashie_object.yml +52 -0
  44. data/spec/cassettes/Feedlr_Gateway_Entries/_user_entries/resoponds_with_hashie_object.yml +337 -0
  45. data/spec/cassettes/Feedlr_Gateway_Evernote/_add_to_evernote/resoponds_with_hashie_object.yml +50 -0
  46. data/spec/cassettes/Feedlr_Gateway_Evernote/_evernote_notebooks/resoponds_with_hashie_object.yml +51 -0
  47. data/spec/cassettes/Feedlr_Gateway_Evernote/_unlink_evernote/resoponds_with_hashie_object.yml +50 -0
  48. data/spec/cassettes/Feedlr_Gateway_Facebook/_facebook_suggestions/resoponds_with_hashie_object.yml +52 -0
  49. data/spec/cassettes/Feedlr_Gateway_Facebook/_unlink_facebook/resoponds_with_hashie_object.yml +50 -0
  50. data/spec/cassettes/Feedlr_Gateway_Feeds/_feeds/resoponds_with_hashie_object.yml +51 -0
  51. data/spec/cassettes/Feedlr_Gateway_Markers/_lastest_tagged_entries/resoponds_with_hashie_object.yml +52 -0
  52. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_articles_as_read/resoponds_with_hashie_object.yml +50 -0
  53. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_articles_as_unread/resoponds_with_hashie_object.yml +50 -0
  54. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_categories_as_read/with_asOf_param/resoponds_with_hashie_object.yml +50 -0
  55. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_categories_as_read/with_lastReadEntryId_param/resoponds_with_hashie_object.yml +50 -0
  56. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_feeds_as_read/with_asOf_param/resoponds_with_hashie_object.yml +50 -0
  57. data/spec/cassettes/Feedlr_Gateway_Markers/_mark_feeds_as_read/with_lastReadEntryId_param/resoponds_with_hashie_object.yml +50 -0
  58. data/spec/cassettes/Feedlr_Gateway_Markers/_sync_read_counts/resoponds_with_hashie_object.yml +52 -0
  59. data/spec/cassettes/Feedlr_Gateway_Markers/_undo_mark_categories_as_read/resoponds_with_hashie_object.yml +50 -0
  60. data/spec/cassettes/Feedlr_Gateway_Markers/_undo_mark_feeds_as_read/resoponds_with_hashie_object.yml +50 -0
  61. data/spec/cassettes/Feedlr_Gateway_Markers/_user_unread_counts/resoponds_with_hashie_object.yml +52 -0
  62. data/spec/cassettes/Feedlr_Gateway_Microsoft/_add_to_onenote/resoponds_with_hashie_object.yml +52 -0
  63. data/spec/cassettes/Feedlr_Gateway_Microsoft/_unlink_microsoft/resoponds_with_hashie_object.yml +50 -0
  64. data/spec/cassettes/Feedlr_Gateway_Mixes/_stream_most_engaging/resoponds_with_hashie_object.yml +102 -0
  65. data/spec/cassettes/Feedlr_Gateway_Opml/_import_opml/resoponds_with_hashie_object.yml +63 -0
  66. data/spec/cassettes/Feedlr_Gateway_Opml/_user_opml/resoponds_with_hashie_object.yml +80 -0
  67. data/spec/cassettes/Feedlr_Gateway_Preferences/_preferences/resoponds_with_hashie_object.yml +52 -0
  68. data/spec/cassettes/Feedlr_Gateway_Preferences/_update_preferences/resoponds_with_hashie_object.yml +50 -0
  69. data/spec/cassettes/Feedlr_Gateway_Profile/_get_profile/resoponds_with_hashie_object.yml +54 -0
  70. data/spec/cassettes/Feedlr_Gateway_Profile/_profile/resoponds_with_hashie_object.yml +54 -0
  71. data/spec/cassettes/Feedlr_Gateway_Profile/_update_profile/resoponds_with_hashie_object.yml +54 -0
  72. data/spec/cassettes/Feedlr_Gateway_Search/_search_feeds/resoponds_with_hashie_object.yml +303 -0
  73. data/spec/cassettes/Feedlr_Gateway_Search/_search_stream/resoponds_with_hashie_object.yml +1941 -0
  74. data/spec/cassettes/Feedlr_Gateway_Shorten/_shorten/resoponds_with_hashie_object.yml +51 -0
  75. data/spec/cassettes/Feedlr_Gateway_Streams/_stream_entries_contents/resoponds_with_hashie_object.yml +1150 -0
  76. data/spec/cassettes/Feedlr_Gateway_Streams/_stream_entries_ids/resoponds_with_hashie_object.yml +51 -0
  77. data/spec/cassettes/Feedlr_Gateway_Subscriptions/_add_subscription/resoponds_with_hashie_object.yml +53 -0
  78. data/spec/cassettes/Feedlr_Gateway_Subscriptions/_create_subscription/resoponds_with_hashie_object.yml +51 -0
  79. data/spec/cassettes/Feedlr_Gateway_Subscriptions/_delete_subscription/resoponds_with_hashie_object.yml +50 -0
  80. data/spec/cassettes/Feedlr_Gateway_Subscriptions/_update_subscription/resoponds_with_hashie_object.yml +51 -0
  81. data/spec/cassettes/Feedlr_Gateway_Subscriptions/_user_subscriptions/resoponds_with_hashie_object.yml +57 -0
  82. data/spec/cassettes/Feedlr_Gateway_Tags/_change_tag_label/resoponds_with_hashie_object.yml +50 -0
  83. data/spec/cassettes/Feedlr_Gateway_Tags/_delete_tags/resoponds_with_hashie_object.yml +50 -0
  84. data/spec/cassettes/Feedlr_Gateway_Tags/_get_tags/resoponds_with_hashie_object.yml +50 -0
  85. data/spec/cassettes/Feedlr_Gateway_Tags/_tag_entries/resoponds_with_hashie_object.yml +50 -0
  86. data/spec/cassettes/Feedlr_Gateway_Tags/_untag_entries/resoponds_with_hashie_object.yml +50 -0
  87. data/spec/cassettes/Feedlr_Gateway_Tags/_user_tags/resoponds_with_hashie_object.yml +50 -0
  88. data/spec/cassettes/Feedlr_Gateway_Topics/_add_topic/resoponds_with_hashie_object.yml +50 -0
  89. data/spec/cassettes/Feedlr_Gateway_Topics/_delete_topic/resoponds_with_hashie_object.yml +50 -0
  90. data/spec/cassettes/Feedlr_Gateway_Topics/_update_topic/resoponds_with_hashie_object.yml +50 -0
  91. data/spec/cassettes/Feedlr_Gateway_Topics/_user_topics/resoponds_with_hashie_object.yml +50 -0
  92. data/spec/cassettes/Feedlr_Gateway_Twitter/_twitter_suggestions/resoponds_with_hashie_object.yml +50 -0
  93. data/spec/cassettes/Feedlr_Gateway_Twitter/_unlink_twitter/resoponds_with_hashie_object.yml +50 -0
  94. data/spec/feedly/base_spec.rb +10 -0
  95. data/spec/feedly/client_spec.rb +49 -0
  96. data/spec/feedly/collection_spec.rb +21 -0
  97. data/spec/feedly/error_spec.rb +59 -0
  98. data/spec/feedly/feedly_spec.rb +54 -0
  99. data/spec/feedly/gateway/categories_spec.rb +59 -0
  100. data/spec/feedly/gateway/entries_spec.rb +67 -0
  101. data/spec/feedly/gateway/evernote_spec.rb +60 -0
  102. data/spec/feedly/gateway/facebook_spec.rb +36 -0
  103. data/spec/feedly/gateway/feeds_spec.rb +36 -0
  104. data/spec/feedly/gateway/markers_spec.rb +295 -0
  105. data/spec/feedly/gateway/microsoft_spec.rb +40 -0
  106. data/spec/feedly/gateway/mixes_spec.rb +27 -0
  107. data/spec/feedly/gateway/opml_spec.rb +57 -0
  108. data/spec/feedly/gateway/preferences_spec.rb +41 -0
  109. data/spec/feedly/gateway/profile_spec.rb +40 -0
  110. data/spec/feedly/gateway/search_spec.rb +43 -0
  111. data/spec/feedly/gateway/shorten_spec.rb +27 -0
  112. data/spec/feedly/gateway/streams_spec.rb +44 -0
  113. data/spec/feedly/gateway/subscriptions_spec.rb +87 -0
  114. data/spec/feedly/gateway/tags_spec.rb +129 -0
  115. data/spec/feedly/gateway/topics_spec.rb +77 -0
  116. data/spec/feedly/gateway/twitter_spec.rb +37 -0
  117. data/spec/feedly/mapper_spec.rb +25 -0
  118. data/spec/feedly/rate_limit_spec.rb +41 -0
  119. data/spec/feedly/request_spec.rb +74 -0
  120. data/spec/feedly/success_spec.rb +7 -0
  121. data/spec/feedly/version_spec.rb +9 -0
  122. data/spec/helper.rb +52 -0
  123. metadata +319 -0
@@ -0,0 +1,36 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Categories API
4
+ #
5
+ # @see http://developer.feedly.com/v3/categories/
6
+ module Categories
7
+ # Get the list of all user categories
8
+ #
9
+ # @see http://developer.feedly.com/v3/categories/get-the-list-of-all-categories
10
+ # @return [Feedlr::Collection]
11
+ def user_categories
12
+ build_object(:get , '/categories')
13
+ end
14
+
15
+ # Change the label of an existing user category
16
+ #
17
+ # @see http://developer.feedly.com/v3/categories/#change-the-label-of-an-existing-category
18
+ # @param category_id [String]
19
+ # @param new_value [String] label's new value
20
+ # @return [Feedlr::Success]
21
+ def change_category_label(category_id , new_value)
22
+ build_object(:post , "/categories/#{CGI.escape(category_id) }" ,
23
+ label: new_value)
24
+ end
25
+
26
+ # Delete a user category
27
+ #
28
+ # @see http://developer.feedly.com/v3/categories/#delete-a-category
29
+ # @param category_id [String]
30
+ # @return [Feedlr::Success]
31
+ def delete_category(category_id)
32
+ build_object(:delete , "/categories/#{CGI.escape(category_id) }")
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,40 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Entries API
4
+ #
5
+ # @see http://developer.feedly.com/v3/entries/
6
+ module Entries
7
+ # Get the content of an entry
8
+ #
9
+ # @see user_entries
10
+ # @param entry_id [String]
11
+ # @return [Feedlr::Base]
12
+ def user_entry(entry_id)
13
+ user_entries([entry_id]).first
14
+ end
15
+
16
+ # Get the content for a dynamic list of entries
17
+ #
18
+ # @see http://developer.feedly.com/v3/entries/#get-the-content-for-a-dynamic-list-of-entries
19
+ # @param entries_ids [Array] list of ids
20
+ # @param options [Hash]
21
+ # @option options [String] :continuation next cursor id
22
+ # @return [Feedlr::Collection]
23
+ def user_entries(entries_ids , options = {})
24
+ build_object(:post , '/entries/.mget',
25
+ continuation: options[:continuation],
26
+ ids: entries_ids
27
+ )
28
+ end
29
+
30
+ # Create and tag an entry
31
+ #
32
+ # @see http://developer.feedly.com/v3/entries/#create-and-tag-an-entry
33
+ # @param entry [Hash]
34
+ # @return [String]
35
+ def add_entry(entry)
36
+ build_object(:post , '/entries' , entry).first
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,37 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Evernote API
4
+ #
5
+ # @see http://developer.feedly.com/v3/evernote/
6
+ # The following API actions do not have corresponding methods in
7
+ # this module:
8
+ #
9
+ # * Link Evernote account
10
+ module Evernote
11
+ # Unlink Evernote account
12
+ #
13
+ # @see http://developer.feedly.com/v3/evernote/#unlink-evernote-account
14
+ # @return [Feedlr::Success]
15
+ def unlink_evernote
16
+ build_object(:delete , '/evernote/auth')
17
+ end
18
+
19
+ # Get a list of Evernote notebooks (Pro only)
20
+ #
21
+ # @see http://developer.feedly.com/v3/evernote/#get-a-list-of-evernote-notebooks-pro-only
22
+ # @return [Feedlr::Collection]
23
+ def evernote_notebooks
24
+ build_object(:get , '/evernote/notebooks')
25
+ end
26
+
27
+ # Save an article as a note (Pro only)
28
+ #
29
+ # @see http://developer.feedly.com/v3/evernote/#save-an-article-as-a-note-pro-only
30
+ # @param entry [Hash]
31
+ # @return [Feedlr::Success]
32
+ def add_to_evernote(entry)
33
+ build_object(:post , '/evernote/note' , entry)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,28 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Facebook API
4
+ #
5
+ # @see http://developer.feedly.com/v3/facebook/
6
+ # The following API actions do not have corresponding methods in
7
+ # this module:
8
+ #
9
+ # * Link Facebook account
10
+ module Facebook
11
+ # Unlink Facebook account
12
+ #
13
+ # @see http://developer.feedly.com/v3/facebook/#unlink-facebook-account
14
+ # @return [Feedlr::Success]
15
+ def unlink_facebook
16
+ build_object(:delete , '/facebook/auth')
17
+ end
18
+
19
+ # Get suggested feeds
20
+ #
21
+ # @see http://developer.feedly.com/v3/facebook/#get-suggested-feeds
22
+ # @return [Feedlr::Collection]
23
+ def facebook_suggestions
24
+ build_object(:get , '/facebook/suggestions')
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,26 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Feeds API
4
+ #
5
+ # @see http://developer.feedly.com/v3/feeds/
6
+ module Feeds
7
+ # Get the metadata about a specific feed
8
+ #
9
+ # @see http://developer.feedly.com/v3/feeds/#get-the-metadata-about-a-specific-feed
10
+ # @param feed_id [String]
11
+ # @return [Feedlr::Base]
12
+ def feed(feed_id)
13
+ feeds([feed_id]).first
14
+ end
15
+
16
+ # Get the metadata for a list of feeds
17
+ #
18
+ # @see http://developer.feedly.com/v3/feeds/#get-the-metadata-for-a-list-of-feeds
19
+ # @param feeds_ids [Array] list of ids
20
+ # @return [Feedlr::Collection]
21
+ def feeds(feeds_ids)
22
+ build_object(:post , '/feeds/.mget' , feeds_ids)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,195 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Markers API
4
+ #
5
+ # @see http://developer.feedly.com/v3/markers/
6
+ module Markers
7
+ # Get the list of unread counts
8
+ #
9
+ # @see http://developer.feedly.com/v3/markers/#get-the-list-of-unread-counts
10
+ # @param options [Hash]
11
+ # @option options [String] :autorefresh let's the server know
12
+ # if this is a background auto-refresh or not
13
+ # @option options [String] :newerThan timestamp in ms. Default is 30 days.
14
+ # @option options [String] :streamId A user or system category
15
+ # can be passed to restrict the unread count response
16
+ # to feeds in this category
17
+ # @return [Feedlr::Base]
18
+ def user_unread_counts(options = {})
19
+ build_object(:get , '/markers/counts' , options)
20
+ end
21
+
22
+ # Mark an articles as read
23
+ #
24
+ # @see mark_articles_as_read
25
+ # @param article_id [String]
26
+ # @return [Feedlr::Success]
27
+ def mark_article_as_read(article_id)
28
+ mark_articles_as_read([article_id])
29
+ end
30
+
31
+ # Mark multiple articles as read
32
+ #
33
+ # @see http://developer.feedly.com/v3/markers/#mark-one-or-multiple-articles-as-read
34
+ # @param articles_ids [Array]
35
+ # @return [Feedlr::Success]
36
+ def mark_articles_as_read(articles_ids)
37
+ build_object(:post , '/markers' ,
38
+ entryIds: articles_ids ,
39
+ action: 'markAsRead' ,
40
+ type: 'entries'
41
+ )
42
+ end
43
+
44
+ # Keep an article as unread
45
+ #
46
+ # @see mark_articles_as_unread
47
+ # @param article_id [String]
48
+ # @return [Feedlr::Success]
49
+ def mark_article_as_unread(article_id)
50
+ mark_articles_as_unread([article_id])
51
+ end
52
+
53
+ # Keep multiple articles as unread
54
+ #
55
+ # @see http://developer.feedly.com/v3/markers/#mark-one-or-multiple-articles-as-read
56
+ # @param articles_ids [Array]
57
+ # @return [Feedlr::Success]
58
+ def mark_articles_as_unread(articles_ids)
59
+ build_object(:post , '/markers' ,
60
+ entryIds: articles_ids ,
61
+ action: 'keepUnread' ,
62
+ type: 'entries'
63
+ )
64
+ end
65
+
66
+ # Mark feeds as read
67
+ #
68
+ # @see mark_feeds_as_read
69
+ # @param feed_id [String]
70
+ # @param options [Hash]
71
+ # @return [Feedlr::Success]
72
+ def mark_feed_as_read(feed_id , options)
73
+ mark_feeds_as_read([feed_id] , options)
74
+ end
75
+
76
+ # Mark feeds as read
77
+ #
78
+ # @see http://developer.feedly.com/v3/markers/#mark-a-feed-as-read
79
+ # @param feeds_ids [Array]
80
+ # @param options [Hash]
81
+ # @option options [String] :lastReadEntryId
82
+ # @option options [String] :asOf timestamp
83
+ # @return [Feedlr::Success]
84
+ def mark_feeds_as_read(feeds_ids, options)
85
+ fail(ArgumentError) unless options[:lastReadEntryId] || options[:asOf]
86
+
87
+ opts = {
88
+ feedIds: feeds_ids ,
89
+ action: 'markAsRead' ,
90
+ type: 'feeds'
91
+ }
92
+ opts[:lastReadEntryId] =
93
+ options[:lastReadEntryId] if options[:lastReadEntryId]
94
+ opts[:asOf] = options[:asOf] if options[:asOf]
95
+ build_object(:post , '/markers' , opts)
96
+ end
97
+
98
+ # Mark a category as read
99
+ #
100
+ # @see mark_categories_as_read
101
+ # @param category_id [String]
102
+ # @param options [Hash]
103
+ # @return [Feedlr::Success]
104
+ def mark_category_as_read(category_id , options)
105
+ mark_categories_as_read([category_id] , options)
106
+ end
107
+
108
+ # Mark categories as read
109
+ #
110
+ # @see http://developer.feedly.com/v3/markers/#mark-a-category-as-read
111
+ # @param categories_ids [Array]
112
+ # @param options [Hash]
113
+ # @option options [String] :lastReadEntryId
114
+ # @option options [String] :asOf timestamp
115
+ # @return [Feedlr::Success]
116
+ def mark_categories_as_read(categories_ids, options)
117
+ fail(ArgumentError) unless options[:lastReadEntryId] || options[:asOf]
118
+
119
+ opts = {
120
+ categoryIds: categories_ids ,
121
+ action: 'markAsRead' ,
122
+ type: 'categories'
123
+ }
124
+ opts[:lastReadEntryId] =
125
+ options[:lastReadEntryId] if options[:lastReadEntryId]
126
+ opts[:asOf] = options[:asOf] if options[:asOf]
127
+ build_object(:post , '/markers' , opts)
128
+ end
129
+
130
+ # Undo mark a feed as read
131
+ #
132
+ # @see undo_mark_feeds_as_read
133
+ # @param feed_id [String]
134
+ # @return [Feedlr::Success]
135
+ def undo_mark_feed_as_read(feed_id)
136
+ undo_mark_feeds_as_read([feed_id])
137
+ end
138
+
139
+ # Undo mark feeds as read
140
+ #
141
+ # @see http://developer.feedly.com/v3/markers/#undo-mark-as-read
142
+ # @param feeds_ids [Array]
143
+ # @return [Feedlr::Success]
144
+ def undo_mark_feeds_as_read(feeds_ids)
145
+ build_object(:post , '/markers',
146
+ feedIds: feeds_ids ,
147
+ action: 'undoMarkAsRead' ,
148
+ type: 'feeds'
149
+ )
150
+ end
151
+
152
+ # Undo Mark a category as read
153
+ #
154
+ # @see undo_mark_categories_as_read
155
+ # @param category_id [String]
156
+ # @return [Feedlr::Success]
157
+ def undo_mark_category_as_read(category_id)
158
+ undo_mark_categories_as_read([category_id])
159
+ end
160
+
161
+ # Undo mark categories as read
162
+ #
163
+ # @see http://developer.feedly.com/v3/markers/#undo-mark-as-read
164
+ # @param categories_ids [Array]
165
+ # @return [Feedlr::Success]
166
+ def undo_mark_categories_as_read(categories_ids)
167
+ build_object(:post , '/markers',
168
+ categoryIds: categories_ids,
169
+ action: 'undoMarkAsRead',
170
+ type: 'categories'
171
+ )
172
+ end
173
+
174
+ # Get the latest read operations (to sync local cache)
175
+ #
176
+ # @see http://developer.feedly.com/v3/markers/#get-the-latest-read-operations-to-sync-local-cache
177
+ # @param options [Hash]
178
+ # @option options [String] :newerThan timestamp in ms. Default is 30 days.
179
+ # @return [Feedlr::Base]
180
+ def sync_read_counts(options = {})
181
+ build_object(:get , '/markers/reads' , options)
182
+ end
183
+
184
+ # Get the latest tagged entry ids
185
+ #
186
+ # @see http://developer.feedly.com/v3/markers/#get-the-latest-tagged-entry-ids
187
+ # @param options [Hash]
188
+ # @option options [String] :newerThan timestamp in ms. Default is 30 days.
189
+ # @return [Feedlr::Base]
190
+ def lastest_tagged_entries(options = {})
191
+ build_object(:get , '/markers/tags' , options)
192
+ end
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,30 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Microsoft API
4
+ #
5
+ # @see http://developer.feedly.com/v3/microsoft/
6
+ #
7
+ # The following API actions do not have corresponding methods in
8
+ # this module:
9
+ #
10
+ # * Link Microsoft Account
11
+ module Microsoft
12
+ # Unlink Windows Live account
13
+ #
14
+ # @see http://developer.feedly.com/v3/microsoft/#unlink-windows-live-account
15
+ # @return [Feedlr::Success]
16
+ def unlink_microsoft
17
+ build_object(:delete , '/microsoft/liveAuth')
18
+ end
19
+
20
+ # Add an article in OneNote
21
+ #
22
+ # @see http://developer.feedly.com/v3/microsoft/#add-an-article-in-onenote
23
+ # @param entry_id [String]
24
+ # @return [Feedlr::Success]
25
+ def add_to_onenote(entry_id)
26
+ build_object(:post , '/microsoft/oneNoteAdd', entryId: entry_id)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,29 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # Mixes API
4
+ #
5
+ # @see http://developer.feedly.com/v3/mixes/
6
+ module Mixes
7
+ # Get a mix of the most engaging content available in a stream
8
+ #
9
+ # @see http://developer.feedly.com/v3/mixes/#get-a-mix-of-the-most-engaging-content-available-in-a-stream
10
+ # @param stream_id [String]
11
+ # @param options [Hash]
12
+ # @option options [String] :count number of entry ids to return.
13
+ # default is 3. max is 20
14
+ # @option options [String] :unreadOnly boolean default value is false
15
+ # @option options [String] :hours hour of the day
16
+ # @option options [String] :newerThan timestamp in ms
17
+ # @option options [String] :backfill if "hours" is provided,
18
+ # and there aren't enough articles to match the entry count requested,
19
+ # the server will look back in time to find more articles.
20
+ # Articles from the first n hours will be returned first
21
+ # @option options [String] :locale preferred locale for results
22
+ # @return [Feedlr::Base]
23
+ def stream_most_engaging(stream_id , options = {})
24
+ build_object(:get, '/mixes/contents',
25
+ { streamId: stream_id }.merge(options))
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,26 @@
1
+ module Feedlr
2
+ module Gateway
3
+ # OPML API
4
+ #
5
+ # @see http://developer.feedly.com/v3/opml/
6
+ module Opml
7
+ # Export the user's subscriptions as an OPML file
8
+ #
9
+ # @see http://developer.feedly.com/v3/opml/#export-the-users-subscriptions-as-an-opml-file
10
+ # @return [Feedlr::Base]
11
+ def user_opml
12
+ build_object(:get, '/opml', {}, :'Content-Type' => 'text/xml')
13
+ end
14
+
15
+ # Import an OPML
16
+ #
17
+ # @see http://developer.feedly.com/v3/opml/#import-an-opml
18
+ # @param io_stream [IOStream] Any IOStream object
19
+ # @return [Feedlr::Success]
20
+ def import_opml(io_stream)
21
+ build_object(:post, '/opml', io_stream.read,
22
+ :'Content-Type' => 'text/xml')
23
+ end
24
+ end
25
+ end
26
+ end