{"id":19357759,"url":"https://github.com/joomla-framework/google-api","last_synced_at":"2026-04-02T02:53:35.553Z","repository":{"id":7094507,"uuid":"8385791","full_name":"joomla-framework/google-api","owner":"joomla-framework","description":"[DEPRECATED] Joomla Framework Google Package","archived":false,"fork":false,"pushed_at":"2021-09-18T10:47:42.000Z","size":222,"stargazers_count":5,"open_issues_count":0,"forks_count":16,"subscribers_count":18,"default_branch":"2.0-dev","last_synced_at":"2025-04-02T14:21:48.829Z","etag":null,"topics":["google","joomla","joomla-framework","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joomla-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-24T03:22:09.000Z","updated_at":"2022-12-16T22:01:32.000Z","dependencies_parsed_at":"2022-08-19T17:31:16.211Z","dependency_job_id":null,"html_url":"https://github.com/joomla-framework/google-api","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgoogle-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgoogle-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgoogle-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomla-framework%2Fgoogle-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joomla-framework","download_url":"https://codeload.github.com/joomla-framework/google-api/tar.gz/refs/heads/2.0-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250424937,"owners_count":21428470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","joomla","joomla-framework","php"],"created_at":"2024-11-10T07:09:05.570Z","updated_at":"2025-10-04T06:44:45.512Z","avatar_url":"https://github.com/joomla-framework.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## The Google Package [![Build Status](https://travis-ci.org/joomla-framework/google-api.png?branch=master)](https://travis-ci.org/joomla-framework/google-api)\n\n### Deprecated\n\nThe `joomla/google` package is deprecated with no further updates planned.\n\n### Using the Google Package\n\nThe Google package is designed to be a straightforward interface for working with various Google APIs. You can find a list of APIs and documentation for each API at [https://developers.google.com/products/.](https://developers.google.com/products/)\n\n#### Instantiating Google\n\nInstantiating Google is easy:\n\n```php\nuse Joomla\\Google\\Google;\n\n$google = new Google;\n```\n\nThis creates a generic Google object that can be used to instantiate objects for specific Google APIs.\n\nSometimes it is necessary to specify additional options. This can be done by injecting in a Registry object with your preferred options:\n\n```php\nuse Joomla\\Google\\Google;\nuse Joomla\\Registry\\Registry;\n\n$options = new Registry;\n$options-\u003eset('clientid', 'google_client_id.apps.googleusercontent.com');\n$options-\u003eset('clientsecret', 'google_client_secret');\n\n$google = new Google($options);\n```\n\n#### Accessing the JGoogle APIs\n\nThe Google Package divides APIs into two types: data APIs and embed APIs. Data APIs use `Joomla\\Http` to send and receive data from Google. Embed APIs output HTML, JavaScript, and XML in order to embed information from Google in a webpage.\n\nThe Google package is still incomplete, but there are five object APIs that have currently been implemented:\n\nData: Google Calendar, Google AdSense, Google Picasa\n\nEmbed: Google Maps, Google Analytics\n\nOnce a Google object has been created, it is simple to use it to create objects for each individual API:\n\n```php\n$calendar = $google-\u003edata('calendar');\n```\n\nor\n\n```php\n$analytics = $google-\u003edata('analytics');\n```\n\n#### Using an API\n\nSee below for an example demonstrating the use of the Calendar API:\n\n```php\nuse Joomla\\Google\\Google;\nuse Joomla\\Registry\\Registry;\n\n$options = new Registry;\n\n// Client ID and Client Secret can be obtained  through the Google API Console (https://code.google.com/apis/console/).\n$options-\u003eset('clientid', 'google_client_id.apps.googleusercontent.com');\n$options-\u003eset('clientsecret', 'google_client_secret');\n$options-\u003eset('redirecturi', JURI::current());\n\n$google = new Google($options);\n\n// Get a calendar API object\n$calendar = $google-\u003edata('calendar');\n\n// If the client hasn't been authenticated via OAuth yet, redirect to the appropriate URL and terminate the program\nif (!$calendar-\u003eisAuth())\n{\n\tJResponse::sendHeaders();\n\tdie();\n}\n\n// Create a new Google Calendar called \"Hello World.\"\n$calendar-\u003ecreateCalendar('Hello World');\n```\n\n#### More Information\n\nThe following resources contain more information:[Joomla! API Reference](http://api.joomla.org), [Google Developers Homepage](https://developers.google.com/)\n\n\n## Installation via Composer\n\nAdd `\"joomla/google\": \"2.0.*@dev\"` to the require block in your composer.json and then run `composer install`.\n\n```json\n{\n\t\"require\": {\n\t\t\"joomla/google\": \"2.0.*@dev\"\n\t}\n}\n```\n\nAlternatively, you can simply run the following from the command line:\n\n```sh\ncomposer require joomla/google \"2.0.*@dev\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-framework%2Fgoogle-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoomla-framework%2Fgoogle-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomla-framework%2Fgoogle-api/lists"}