Exploring the Blogger API End-Points

The blogs resource has two children resource types, pages and posts.
          A posts resource may have comments resource children.


## assumes gapi.json configuration in working directory with scoped project and user authorization
my $gapi_client = WebService::GoogleAPI::Client->new( debug => 1, gapi_json => './gapi.json', user=> 'peter@pscott.com.au' );


Resource Type
Supported Methods
listgetgetByUrlgetByPathlistByUsersearchinsertdeletepatchupdate
Blogsnoyesyesnoyesnonononono
Postsyesyesnoyesnoyesyesyesyesyes
Commentsyesyesnononononononono
Pagesyesyesnononononononono
Usersnoyesnononononononono




my $gapi_agent = WebService::GoogleAPI::Client->new(
debug => 1,
gapi_json=>'./gapi.json',
user=> 'peter@shotgundriver.com' );


## AVAILABLE API IDS
if ( 1 == 0 )
{
my @apis = $gapi_agent>list_of_available_google_api_ids();
say "AVAILABLE GOOGLE SERVICE IDs = " . join( ", ", @apis );
say "Total count = " . scalar( @apis );
}
my $blogger_api = $gapi_agent->methods_available_for_google_api_id( 'blogger' );
#say "Available api end-points for gmail = \n\t" . join("\n\t", keys %$blogger_api);
say "Available api end-points for blogger = \n\t" . join( ",", keys %$blogger_api ) . "\n\n";
say "blogger includes a total of " . scalar( keys %$blogger_api ) . ' methods';
say '-' x 50;
say "blogger.blogs.listByUser";
say '-' x 50;
p( %{ $gapi_agent->extract_method_discovery_detail_from_api_spec( 'blogger.blogs.listByUser') } );
my $r = $gapi_agent->api_query(
api_endpoint_id => 'blogger.blogs.listByUser',
options => { userId => 'self' },
);
p( %{$r->json->{items}[0]} );



Comments

Popular posts from this blog

First Post