Hello,
where can i find a documentation for this kind of API(for absolute beginners please)
The best would be a 5min video tutorial, that explains it in 1,2,3 steps.
Without knowing the syntax it is impossible to login or execute commands.
thank you
where can i find a documentation for this kind of API(for absolute beginners please)
The best would be a 5min video tutorial, that explains it in 1,2,3 steps.
Without knowing the syntax it is impossible to login or execute commands.
thank you
This isn't exactly what you're asking for, but the following is a script I use to backup my newsblur data locally; it uses the command-line program "curl" to execute a sequence of operations against the API. Perhaps looking at it will set you on the right track:
#!/bin/bash
if [ "x$1" = "x" -o "x$2" = "x" ]; then
echo "${0} [password] [starred item page count]";
exit 1;
fi
cookieJar=/tmp/nb-cookies
# login to establish an authentication cookie
login_output=$(curl --cookie-jar ${cookieJar} -d username=jsled -d password="$1" http://www.newsblur.com/api/login)
# parse my user_id from the json response
user_id=$(echo $login_output | jq '.user_id')
echo "parsed user_id [${user_id}]"
# export subscriptions as OPML
curl --cookie ${cookieJar} http://www.newsblur.com/import/opml_export -o newsblur-subscriptions.opml
# save all the pages of starred items.
for i in $(seq $2); do
curl --cookie ${cookieJar} http://www.newsblur.com/reader/starred_stories"?page=${i}" -o starred-page-$(printf "%0.2d" ${i}).json;
done
# export my shared stories
curl --cookie ${cookieJar} http://www.newsblur.com/social/stories/${user_id}/jsled -o shared-stories.json
# cleanup
#rm ${cookieJar}
Related Conversations
SSL for API login?
- Greg Hurlman, 3 years ago
- Last reply: Samuel Clay, 3 years ago
- 1
- 1
- Idea
Basic command-line API use?
- Josh Sled, 1 year ago
- Last reply: Josh Sled, 1 year ago
- 1
- 2
- Question
Can't login via the API
- rtopitt, 2 years ago
- Last reply: Andrew Mittereder, 2 years ago
- 1
- 4
- Problem
/api/login is returning a 502 message
- var = DivisiveCotton, 11 months ago
- Last reply: Samuel Clay, 11 months ago
- 1
- 1
- Question

