Install The Google Client Library Specifying Google Sheets

Posted

in

by

We will only be needing the Online Spreadsheet Editor of Google, otherwise known as Google Sheets, for the examples we will be making. Thus, we will not be including the other Google API services, which is about 200+ all in all. And we will be using composer to install the Google Client Library.

Overview of all the google api services.

In order to exclude dependencies we are not using on the example test web application we are developing for this tutorial, we will specify that we only need “Google Sheets” or simply “Sheets“, and run the task Google\Task\Composer::cleanup. All these configurations, we will be setting them up on the composer.json file.

Requirements:

Step 1.

Copy the following into your composer.json file.

{
    "require": {
        "google/apiclient": "^2.12.1"
    },
    "scripts": {
        "pre-autoload-dump": "Google\\Task\\Composer::cleanup"
    },
    "extra": {
        "google/apiclient-services": [
            "Sheets"
        ]
    }
}

Step 2.

Execute the following command to install the Google Client Library, particularly for Google Sheets.

$ composer install

Done.

Google Client Library Specifying Google Sheets is now installed.

Look, we only have Google Sheets API Client Library.

References:


Posted

in

by

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Tutorials

Web Dev Tutorials