Module: Instapaper::API::Highlights
- Included in:
- Instapaper::API
- Defined in:
- lib/instapaper/api/highlights.rb
Overview
Defines methods related to highlights
Instance Method Summary collapse
-
#add_highlight(bookmark_id, options = {}) ⇒ Instapaper::Highlight
Create a new highlight.
-
#delete_highlight(highlight_id, options = {}) ⇒ Boolean
Delete a highlight.
-
#highlights(bookmark_id) ⇒ Object
List highlights for a bookmark.
Instance Method Details
#add_highlight(bookmark_id, options = {}) ⇒ Instapaper::Highlight
Note:
Non-subscribers are limited to 5 highlights per month.
Create a new highlight
20 21 22 |
# File 'lib/instapaper/api/highlights.rb', line 20 def add_highlight(bookmark_id, = {}) perform_post_with_object("/api/1.1/bookmarks/#{bookmark_id}/highlight", , Instapaper::Highlight) end |
#delete_highlight(highlight_id, options = {}) ⇒ Boolean
Delete a highlight
27 28 29 30 |
# File 'lib/instapaper/api/highlights.rb', line 27 def delete_highlight(highlight_id, = {}) perform_post_with_unparsed_response("/api/1.1/highlights/#{highlight_id}/delete", ) true end |
#highlights(bookmark_id) ⇒ Object
List highlights for a bookmark
9 10 11 |
# File 'lib/instapaper/api/highlights.rb', line 9 def highlights(bookmark_id) perform_get_with_objects("/api/1.1/bookmarks/#{bookmark_id}/highlights", {}, Instapaper::Highlight) end |