What is the Blogger API and what can you do with it?
An API, or Application Package Interface is a set of commands you can call, or interface with, from an external application. The developers of an application provides APIs if they want other developer to create apps and interact with their own.
Similarly, the Blogger team has created an API of its own that allows external developers to interact with the Blogger content management system. With this API, you can;
- Add posts, pages and comments from your Blogger blog to a non-blogger website
- Create desktop software that allows users to create or edit Blogger posts from their desktop computers
- Create browser and mobile-based apps that serve the same purpose as above
Basics
First, you need to know some of the basics of objects and resources available in the API. There are five types of resources currently available.
- Blogs - A blog resource represents a full Blogger blog. A user may have more than one Blogger blogs, so the control of multiple blogs is handled by the blogs resource. You can use it to list all the blogs a user has access to, or get a single blog by its ID.
- Posts - A post resource represents a post on a blog, and each is a child of the blog resource. A posts collection contains all the post resources within a blog resource.
- Comments - A comment resource represents a comment on a blog post, and is logically a child object of the respective post resource. A comments collection is a list of all comments under a posts (parent) resource.
- Pages - A blog has static pages which inherit from the blog (as child objects).
- Users - A user resource represents a non-anonymous user, and is used to identify the author of a blog post, page, or comment. A users collection is a list of all the (global) user resources on Blogger. For privacy reasons, a list of all the users on Blogger cannot be listed. However, you can retrieve your own user resource by your unique ID (or by using the self identifier)
API Reference
Here is a list of methods as described in the Blogger API v3 reference.
Operation | Description | REST HTTP mappings |
---|---|---|
list | Lists all resources within a collection | GET on a collection URI |
get | Gets a specific resource | GET on a resource URI |
getByUrl | Gets a resource, looking it up by URL | GET with the URL passed in as a parameter |
getByPath | Gets a resource by looking it up by its path | GET with the Path passed in as a parameter |
listByUser | Lists resources owned by a User | GET on a user owned collection |
search | Search for resources, based on a query parameter | GET on a Search URL, with the query passed in as a parameter |
insert | Create a resource in a collection | POST on a collection URI |
delete | Deletes a resource | DELETE on a resource URI |
patch | Update a resource, using Patch semantics | PATCH on a resource URI |
update | Update a resource | PUT on a resource URI |
The following table matches the resource types in the API (which we discussed earlier) with the methods they support.
Resource Type | Supported Methods | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
list | get | getByUrl | getByPath | listByUser | search | insert | delete | patch | update | |
Blogs | ✗ | ✔ | ✔ | ✗ | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ |
Posts | ✔ | ✔ | ✗ | ✔ | ✗ | ✔ | ✔ | ✔ | ✔ | ✔ |
Comments | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
Pages | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
Users | ✗ | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
You can use these methods to develop a fully functional Blogger app. There are various ways of invoking these methods. You can use HTTP client-side commands, or from JavaScript. You can also develop using client libraries on any one of the following platforms.
- .NET
- Java
- PHP
- Python
- Ruby
- Go
- GWT
- JavaScript
- Node.js
- Objective-C
We will talk more about these client libraries, and calling methods in a future post. In the meantime, if you have any questions regarding the functionality of this API or its methods, please feel free to ask in the comments section below. Cheers :)
If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »
That's great information!
ReplyDeleteThanks for sharing....
you're welcome :)
Deletewww.tricksteaching.com for more
ReplyDeletegreat information. thanks
ReplyDeleteYou're welcome :)
Deletehttp://www.classicopter.com/triple-income
ReplyDeleteYour efforts is good. It will be better if you post the use of Api with a Demo blog. That will be a real compelling post if you can do it.
ReplyDeleteThanks
Qasim bro, I wanted to know if i wish to add post via blogger api as stated here (https://developers.google.com/blogger/docs/3.0/using#AddingAPost) . How can i do it ?? I dont know how to make such a post request with javascript.
ReplyDeletethanks very usefull
ReplyDelete