Skip to content

nodoubtz/google-api-php-client

 
 

Add Release Assets

Google API PHP Client

A PHP client library for accessing Google APIs. This project is a fork of the official Google API PHP Client.

Features

  • Simplified access to various Google APIs.
  • Lightweight and efficient design for PHP developers.
  • Extensively documented for ease of use.

Getting Started

Prerequisites

Ensure you have the following installed:

  • PHP 7.4 or higher
  • Composer dependency manager

Installation

Install the library using Composer:

composer require google/apiclient

Basic Usage

Here is an example of how to use this client:

<?php
require_once 'vendor/autoload.php';

$client = new Google_Client();
$client->setApplicationName('My Application');
$client->setDeveloperKey('YOUR_API_KEY');

// Example: Accessing the YouTube API
$service = new Google_Service_YouTube($client);
$response = $service->search->listSearch('id,snippet', [
    'q' => 'Google Developers',
    'maxResults' => 10,
]);

foreach ($response['items'] as $item) {
    echo $item['snippet']['title'], "\n";
}

Documentation

Complete documentation can be found on the official site.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

Acknowledgments

Special thanks to the Google APIs team for the original implementation of this library.

About

A PHP client library for accessing Google APIs

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%