I’m building a little bot that pulls in all the text posts from a tumblr blog, picks one at random, and returns it to my chatbot that called the command.
I’ve got the chatbot all sorted, and can return whatever text I want from the node.js app, but as I’m still quite new to this kind of programming, I am well and trully flummoxed as to how I would get all the text posts from a tumblr blog. I tried looking into it in many different ways, but there’s so much I really don’t understand about how to do it.
- Twitch keeps talking about its API and how you need to submit an entire application to them to get oauth codes, but I’m only trying to read posts, not actually post or modify anything, and the blog is public
- I found you can put /api/read at the end of the tumblr url to get the xml document containing the latest 20 posts (and you can add a ?start=2 to the end to offset and get the next 20 etc), but have no idea how to get or parse an xml from the link like that, let alone if it’s viable to do several times per offset required PER command
- various confusing bits of info about javascript not being able to get stuff from another domain due to the same origin policy, unless you use JSONP (I don’t even fully understand what the difference between Javascript, JSON and JSONP is X_X )
Any help or guidance AT ALL would be SUPER appreciated!! <3 Sorry for what I presume to be very noob-y questions too.