diff options
author | Pedro Silva <psilva+git@pedrosilva.pt> | 2013-04-04 14:56:00 +0100 |
---|---|---|
committer | Pedro Silva <psilva+git@pedrosilva.pt> | 2013-04-04 14:56:00 +0100 |
commit | 95345ff95dfa0ed94520954fe38f354b53196e14 (patch) | |
tree | 7b6aa1aa88ca8f81a652244f7c5372eed31e8701 | |
parent | 84ae7c75b70cf2b8a94e267801ac87bd709c847d (diff) |
Implement ttrss-subscribe-to-feed
-rw-r--r-- | ttrss.el | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -601,7 +601,6 @@ following key-value pairs: ;;; TODO: Implement following methods: -;; subscribeToFeed ;; unsubscribeFeed ;; getFeedTree @@ -625,5 +624,28 @@ Returns a status string (typically 'OK')." :url url :content content)) +(defun ttrss-subscribe-to-feed (address sid feed-url &rest params) + "Subscribe, at ADDRESS using SID, to FEED-URL with PARAMS. +Returns 0 if the feed already exists, 1 if successfully added, +and nil otherwise. PARAMS is any number of the following +key-value pairs: + +'category-id' + Category ID to place feed into (integer. defaults to 0: Uncategorized) + +'login' + Username to use for basic HTTP authentication at FEED-URL. + +'password' + Password to use for basic HTTP authentication at FEED-URL." + (plist-get (apply 'ttrss-post-request + address + :status + :op "subscribeToFeed" + :sid sid + :feed_url feed-url + params) + :code)) + (provide 'ttrss) ;;; ttrss.el ends here |