Tips for using JSON WordPress API for JetPack-powered websites

Being a lazy person I prefer to automate as much as possible instead of performing routine work manually. Well, you need to make it once to know what you need to automate, but that is where it stops for me.

So I had a goal of preparing and publishing a number of posts on my (only in Russian for now, sorry) website for motorcycle enthusiasts, where the data could nicely fit into a database and when available it can be wrapped in a template and posted. OK, I need to get the data myself, but publishing tenth of posts is NOT an option. Luckily I had already Jetpack installed, which gave me access to the JSON API.

I will describe separately how to obtain the proper authorization tokens (not sure I can repeat it, it is made for confusion, not sure about security though). When you do have those you can use API. My favorite language of choice for automation is Python, therefore I started typing code before even thinking of selecting a different language.

Continue reading “Tips for using JSON WordPress API for JetPack-powered websites”