NAME

Moo::Google::Client - User Agent wrapper for working with Google APIs

VERSION

version 0.03

METHODS

build_http_transaction

Example of usage:

    $gapi->build_http_transaction({
      method => 'post',
      route => 'https://www.googleapis.com/calendar/users/me/calendarList',
      payload => { key => value }
    })

refresh_access_token

Get new access token for user from Google API server

  $self->refresh_access_token({
		client_id => '',
		client_secret => '',
		refresh_token => ''
	})

api_query

Low-level method that can make any API query to any Google service

Required params: method, route

$self->access_token must be valid

Examples of usage:

$gapi->api_query({
    method => 'get',
    route => 'https://www.googleapis.com/calendar/users/me/calendarList',
  });

$gapi->api_query({
    method => 'post',
    route => 'https://www.googleapis.com/calendar/v3/calendars/'.$calendar_id.'/events',
    payload => { key => value }
}

Returns Mojo::Message::Response object

AUTHOR

Pavel Serikov <pavelsr@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Pavel Serikov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.