Next weeks and months I’m going to focus on important features that will allow Telescope to move a little bit beyond where it is now. These features will include different APIs, integrations, and even deprecations of some functionality that existed in Telescope since ages and haven’t really changed since then.
And let’s start with something very simple yet important: the API.
I’m not yet ready to present the whole set of methods for managing your blog from the API (and not sure it's that needed) and I am also not ready to show some nice and well-polished API docs but I am ready to introduce what I call an Open API — two first methods that allow to get/query the contents of your blog or get a specific article. Both methods return JSON objects.
Customizing the query
GET https://telescope.ac/openapi/<blog_path> method can be customized. Just try playing with it by specifying one of the following additional parameters:
// per_page - (int; 20 by default) specifies how many results per page to return
// page - (int; 1 by default)
// query - (text; "" by default) any text that needs to be found in an article
The result will also contain a pagination object that can help you organize the correct pagination:
Need an example?
My personal website currently contains all the articles it fetches from my Telescope blog. You can even view individual articles without visiting Telescope itself — they are displayed natively on my personal page with some matching styling.
Here are the Open API methods it uses:
Have fun exploring!
~ Alex from Telescope.