<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ;;; backpack.el --- Emacs interface to 37signals' Backpack
 
-;; Copyright (C) 2005  Edward O'Connor &lt;ted@oconnor.cx&gt;
+;; Copyright (C) 2005, 2006, 2008  Edward O'Connor &lt;ted@oconnor.cx&gt;
 
 ;; Author: Edward O'Connor &lt;ted@oconnor.cx&gt;
 ;; Keywords: convenience
@@ -56,9 +56,24 @@
 ;; 2005-10-15 - Initial version.
 
 ;;; TODO:
-;; * support for belongings
-;; ** including support for reordering items on a page
-;; * implement missing methods (marked below).
+
+;; In general, the Backpack API has evolved over several revisions, and
+;; backpack.el has only partly kept up with the changes. In general, the
+;; API is moving away from POST-always, verbs-in-URLs model to a more
+;; RESTful situation, in which the same URL can be GET/POST/PUT/DELETEd
+;; for CRUD operations. Several core bits below need to be rethought
+;; given this: `backpack-request', `backpack-api-define', and
+;; potentially any method not implemented with `backpack-api-define'.
+
+;; Specific other TODO items include:
+
+;;   - Implement Users API
+;;   - Implement Statuses API
+;;   - Implement Journal API
+;;   - Implement Belongings API - including reordering items on a page
+;;   - Update Reminders API
+;;   - implement missing methods (marked below).
+;;   - Handle SSL redirects for pro accounts
 
 ;;; Code:
 
@@ -76,7 +91,7 @@
   :group 'processes
   :prefix &quot;backpack-&quot;
   :link '(url-link :tag &quot;Backpack&quot;
-                   &quot;http://backpackit.com/?referrer=BPWJ9&quot;)
+                   &quot;http://www.backpackit.com/?referrer=EDWARDOCONNOR&quot;)
   :link '(url-link :tag &quot;Latest version of backpack.el&quot;
                    &quot;http://github.com/hober/37emacs/tree/master%2Fbackpack.el?raw=true&quot;)
   :link '(url-link :tag &quot;Backpack API documentation&quot;
@@ -324,6 +339,48 @@ PAYLOAD may contain extra arguments to certain API calls.&quot;
           emails)
     (nreverse retval)))
 
+;; TODO: `backpack-parse-statuses-list'
+;; &lt;statuses type=&quot;array&quot;&gt;
+;;   &lt;status&gt;
+;;     &lt;id type=&quot;integer&quot;&gt;...&lt;/id&gt;
+;;     &lt;message&gt;...&lt;/message&gt;
+;;     &lt;updated-at type=&quot;datetime&quot;&gt;...&lt;/updated-at&gt;
+;;     &lt;user-id type=&quot;integer&quot;&gt;...&lt;/user-id&gt;
+;;     &lt;user&gt;
+;;       &lt;id type=&quot;integer&quot;&gt;...&lt;/id&gt;
+;;       &lt;name&gt;...&lt;/name&gt;
+;;     &lt;/user&gt;
+;;   &lt;/status&gt;
+;;   ...
+;; &lt;/statuses&gt;
+
+;; TODO: `backpack-parse-journal-entries-list'
+;; &lt;journal-entries type=&quot;array&quot;&gt;
+;;   &lt;journal-entry&gt;
+;;     &lt;body&gt;...&lt;/body&gt;
+;;     &lt;created-at type=&quot;datetime&quot;&gt;...&lt;/created-at&gt;
+;;     &lt;id type=&quot;integer&quot;&gt;...&lt;/id&gt;
+;;     &lt;updated-at type=&quot;datetime&quot;&gt;...&lt;/updated-at&gt;
+;;     &lt;user&gt;
+;;       &lt;id type=&quot;integer&quot;&gt;...&lt;/id&gt;
+;;       &lt;name&gt;...&lt;/name&gt;
+;;     &lt;/user&gt;
+;;   &lt;/journal-entry&gt;
+;;   ...
+;; &lt;/journal-entries&gt;
+
+;; TODO: `backpack-parse-users-list'
+;; &lt;users type=&quot;array&quot;&gt;
+;;   &lt;user&gt;
+;;     &lt;id type=&quot;integer&quot;&gt;1234&lt;/id&gt;
+;;     &lt;name&gt;John Doe&lt;/name&gt;
+;;   &lt;/user&gt;
+;;   &lt;user&gt;
+;;     &lt;id type=&quot;integer&quot;&gt;5678&lt;/id&gt;
+;;     &lt;name&gt;Foo Bar&lt;/name&gt;
+;;   &lt;/user&gt;
+;; &lt;/user&gt;
+
 ;; * Defining elisp functions corresponding to each API method
 
 (defmacro backpack-api-define (call args payload-args docstring
@@ -535,6 +592,7 @@ Page identified by PAGE-ID, note identified by NOTE-ID.&quot;)
   `((tags () ,(rest-api-join tags))))
 
 ;; ** Reminders
+;; TODO: update
 
 (defun backpack-api/reminders ()
   &quot;Fetch a list of your Backpack reminders.&quot;
@@ -576,8 +634,31 @@ Page identified by PAGE-ID, note identified by NOTE-ID.&quot;)
 (backpack-api-define &quot;/page/%s/emails/destroy/%s&quot; (page-id email-id) ()
   &quot;Delete PAGE-ID's email identified by EMAIL-ID.&quot;)
 
+;; ** Status
+
+(defun backpack-api/statuses ()
+  &quot;List all statuses in your account.
+Users who have not posted a status will not be included.&quot;
+  (let ((r (backpack-request &quot;/statuses&quot;)))
+    (backpack-parse-statuses-list r)))
+
+(backpack-api-define &quot;/users/%s/status&quot; (user-id) ()
+  &quot;Get status of user whose id is USER-ID.&quot;)
+;; TODO: Same URL, but POST -- update status
+
+;; ** Journal
+;; TODO: /journal_entries.xml?n=0&amp;count=100 GET
+;;       /users/#{user_id}/journal_entries.xml?n=0&amp;count=100 GET
+;;       /journal_entries/#{id}.xml GET, PUT, DELETE
+;;       /users/#{user_id}/journal_entries.xml POST
+
+;; ** Users
+;; TODO: /#{token}/users.xml GET
+;;       /#{token}/users/${id}.xml GET
+
 ;; ** Account
 
+;; TODO: Deprecated by /#{token}/users/${id}.xml GET
 (defun backpack-api/account/export ()
   &quot;Fetch a full export of your Backpack account.&quot;
   (let* ((r (backpack-request &quot;/account/export&quot;))</diff>
      <filename>backpack.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0394e79f46b09ce8544ea9269839357844671f10</id>
    </parent>
  </parents>
  <author>
    <name>Edward O'Connor</name>
    <email>hober0@gmail.com</email>
  </author>
  <url>http://github.com/hober/37emacs/commit/49dbb22c558a2e93b85314625759dbe8c04c298a</url>
  <id>49dbb22c558a2e93b85314625759dbe8c04c298a</id>
  <committed-date>2008-08-18T20:31:01-07:00</committed-date>
  <authored-date>2008-08-18T20:31:01-07:00</authored-date>
  <message>Changed referral link.</message>
  <tree>87e7c3d9067228833a2d85de3e50d6d181850b2a</tree>
  <committer>
    <name>Edward O'Connor</name>
    <email>hober0@gmail.com</email>
  </committer>
</commit>
