Of course, to be able to access these methods, the 'consumer' (in this case the portfolio app) should be authenticated and for some of them authorized. "Every request your application sends to the Blogger API must identify your application to Google" (see here). Lets see the case of getting the posts of a given public blog. For this case either the API key or an OAuthi 2.0 token must be provided. I will provide the API key.
One important thing to mention before: If the blog is public, why should the app be identified? because to be able to access the Blogger API, google authorizes each application. The Blogger API should be activated in the Services pane of the Google APIs Console.
Ok, to retrieve a list of posts from a given blog, you can send a GET request to the POST collection URI:
https://www.googleapis.com/blogger/v3/blogs/2399953/posts?key=APP_KEY
To configure this kind of request, to set parameters and to parse the response is the google api java client very helpful. First step is to create a blogger object and to set the application name to it:
Blogger blogger = new Blogger.Builder(new UrlFetchTransport(), new JacksonFactory(), null).setApplicationName("ghlozanom").build(); With the blogger object, any specifi request to this API can be created, confiured and executed. At the end, a set of objects related to the Blog are there ready to be used, for example:
com.google.api.services.blogger.Blogger.Posts.List postsRequest;
postsRequest = blogger.posts().list(BLOG_ID);
PostList postList = postsRequest.setKey(API_KEY).execute()This code snipped retrieves all the post entries for a given blog and a given application (identified with the APP_KEY).




