Download the PHP package academe/googleapi without Composer

On this page you can find all versions of the php package academe/googleapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package googleapi

Google API Access for Laravel 5.4

Quick Summary

This package is still in development, but I am using it in production. Here is a brief description of what the intended use-case is.

This is the Laravel glue and a wrapper for the Google API Client version 3. It provides routes for non-service account authorising and revodking, a model and storage for multiple authorisations that users may have on your application, and helper classes to load and configure the Google API Client.

It's purpose is to allow a Laravel user to authenticate their own Google account with your application, so that your application can access the Google APIs on behalf of that user.

Originally it was just for accessing Google Analytics for a remote site, but it can be used for any of the Google APIs through scopes.

It will support renewal keys, so will be able to access the API offline, i.e. when the user is not present.

The aim is that access token renewals will be invisible to your application. The way the Google API Client is written, this may not be entirely possible, but I hope with the right wrappers it will be.

Your application will need to be registered with Google, and will need to state up front what contexts it wants to access, i.e. which APIs. The end user providing authorisation for their APIs (with OAuth 2) will not need to set up anything special in their account.

Using this package, it is possoble for a single user to authorise access to a Google account, and then share that authorisation with multiple users. All required authorisation details are stored in a model storage rather than a user's session, so access to the model instance is all that is needed for an authorised access to and API.

I hope that sets the context of what this package is trying to achieve.

Requirements

This package requires PHP >=5.6 and Laravel >= 5.4

Installation

Install via composer - edit your composer.json to require the package.

Then run composer update in your terminal to pull it in.

Or use composer require academe/googleapi

Laravel

To use in laravel add the following to the providers array in your config/app.php

There is no facade in this package at this time.

Using This Package

These are just rough developer usage notes.

Sampele code:

Link that allows the current user to authorise the API to access Analytics, then return to the /home URL:

You can set and add scopes too. For example:

You should use POST for this route. If you use GET, then a simple form will be provided for the user to confirm.

All authorisation instances have a name, which is a unique list for each laravel user. The default name is "default". Specify a name when authorisating by adding the 'name' => 'name meanngful to the user' parameter to the authorise route.

Get access to the API and list Analytics accounts that can be accessed:

Once authorised, the access token will be refreshed automatically, so long as the refresh token is not revoked.

The academe_gapi_authorise route will revoke am authorisation for the current user. Parameters include name to identify which authorisaition to revoke. This route should be called using the DELETE HTTP method. A simple confirmation form is provided if the GET method is used.

Other Notes

TODO


All versions of googleapi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version 5.4.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package academe/googleapi contains the following files

Loading the files please wait ....