Basic command-line API use?

  • 1
  • Question
  • Updated 5 years ago
Looking into backing up my saved stories, I'm having trouble getting the most basic command-line API usage working. Any tips?



jsled@phoenix [~/tmp/nb]$ curl --cookie-jar cookies -d username=jsled -d password=secret http://www.newsblur.com/api/login
{"code": 1, "authenticated": true, "errors": null, "result": "ok"}
jsled@phoenix [~/tmp/nb]$ curl --cookie-jar cookies http://www.newsblur.com/reader/starred_stories
{"authenticated": false, "stories": [], "result": "ok", "feeds": {}, "message": null, "user_profiles": []}
Photo of Josh Sled

Josh Sled

  • 123 Posts
  • 36 Reply Likes

Posted 5 years ago

  • 1
Photo of John Morahan

John Morahan

  • 86 Posts
  • 27 Reply Likes
https://getsatisfaction.com/newsblur/...

--cookie-jar writes the file and --cookie reads the cookies back from it

so:

curl --cookie-jar cookies -d username=jsled -d password=secret https://www.newsblur.com/api/login

curl --cookie cookies https://www.newsblur.com/reader/starred_stories


http://linuxcommand.org/man_pages/cur...
Photo of Josh Sled

Josh Sled

  • 123 Posts
  • 36 Reply Likes
Indeed, strange asymmetric command-line flags, though I can see why they'd do it that way.

Thanks for the repeated hint, after I didn't believe you the first time. :)