alphapapa / pocket-lib.el

Emacs library for the getpocket.com API
GNU General Public License v3.0
21 stars 5 forks source link
emacs getpocket pocket pocket-api

This is a simple library for accessing the [[https://getpocket.com/developer/docs/v3/][getpocket.com API]]. It should be considered in late alpha/early beta status at the moment: there are no known bugs, and some features may still be added. The API is not expected to change significantly, but backward-incompatible changes might still be made (although this is unlikely).

** MELPA

Just install the =pocket-lib= package. :)

** Manual

Put =pocket-lib.el= in your =load-path=.

** Authorize

First you must authorize this library to access your Pocket account.

  1. Open your web browser to the Pocket web site, and log out of Pocket. (It seems to only work if you are logged out.)
  2. Run =pocket-lib-get= (this is not an interactive command, so you should call it in the minibuffer like ~(pocket-lib-get)~; typically this will be handled for you by packages that use this library). A URL will be copied to the clipboard and kill-ring.
  3. Visit that URL in your browser, and authorize it.
  4. Run =pocket-lib-get= again. If it worked, you should see an ugly list of data containing the first 10 items on your list.

Now you can use the library.

Note: Please /ignore/ any =Page Not Found= error you might see on the Pocket Web site after authorizing. Just run the ~pocket-reader~ command after authorizing, and it should work. You can verify that authorization completed by checking the file =~/.cache/emacs-pocket-lib-token.json=.

** Functions

For more detailed information on each function, use =describe-function=.

These functions operate on one or more items, which should be alists, structured like items retrieved with =pocket-lib-get=, having at least the =item_id= property.

** v0.3-pre

Changes

Fixes

Acknowledgments

** v0.2

Changes

** v0.1

Initial release.

This package is based on [[https://github.com/lujun9972/pocket-api.el][pocket-api.el]] by [[https://github.com/lujun9972/pocket-api.el][DarkSun/lujun9972]], which is based on [[https://github.com/pterygota/el-pocket][el-pocket]] by [[https://github.com/pterygota/el-pocket][Tod Davies]]. It has essentially been completely written; no code remains except =pocket-lib-default-extra-headers=, a few lines in the call to =request=, and the consumer key is currently the same.

GPLv3