{"id":21614213,"url":"https://github.com/ceytek-labs/google-services-lite","last_synced_at":"2026-01-29T07:39:14.194Z","repository":{"id":257806146,"uuid":"866100754","full_name":"ceytek-labs/google-services-lite","owner":"ceytek-labs","description":"A lightweight library for seamless integration with various Google APIs in PHP.","archived":false,"fork":false,"pushed_at":"2024-11-06T16:17:32.000Z","size":548,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"1.x","last_synced_at":"2025-06-11T15:21:54.563Z","etag":null,"topics":["automation","data-updates","google-api","google-services","google-services-lite","google-sheets","lite-library","php","sheets-automation"],"latest_commit_sha":null,"homepage":"https://github.com/ceytek-labs/google-services-lite","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceytek-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-01T16:42:32.000Z","updated_at":"2024-11-06T16:17:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0305193-09c6-4c0e-a461-5a22c49c2e12","html_url":"https://github.com/ceytek-labs/google-services-lite","commit_stats":null,"previous_names":["ceytek-labs/google-services-lite"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/ceytek-labs/google-services-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceytek-labs%2Fgoogle-services-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceytek-labs%2Fgoogle-services-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceytek-labs%2Fgoogle-services-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceytek-labs%2Fgoogle-services-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceytek-labs","download_url":"https://codeload.github.com/ceytek-labs/google-services-lite/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceytek-labs%2Fgoogle-services-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28870638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T07:35:32.468Z","status":"ssl_error","status_checked_at":"2026-01-29T07:33:31.463Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","data-updates","google-api","google-services","google-services-lite","google-sheets","lite-library","php","sheets-automation"],"created_at":"2024-11-24T22:07:12.745Z","updated_at":"2026-01-29T07:39:14.175Z","avatar_url":"https://github.com/ceytek-labs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ceytek-labs/google-services-lite/refs/heads/1.x/art/banner.png\" width=\"400\" alt=\"Google Services Lite\"\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://packagist.org/packages/ceytek-labs/google-services-lite\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/packagist/dt/ceytek-labs/google-services-lite\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://packagist.org/packages/ceytek-labs/google-services-lite\"\u003e\u003cimg alt=\"Latest Version\" src=\"https://img.shields.io/packagist/v/ceytek-labs/google-services-lite\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://packagist.org/packages/ceytek-labs/google-services-lite\"\u003e\u003cimg alt=\"Size\" src=\"https://img.shields.io/github/repo-size/ceytek-labs/google-services-lite\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://packagist.org/packages/ceytek-labs/google-services-lite\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/packagist/l/ceytek-labs/google-services-lite\"\u003e\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\n------\n\n# Google Services Lite - Google API for PHP\n\n**Google Services Lite** is a lightweight and extendable library designed to help you manage data easily using the Google Sheets API in your PHP projects. Currently, it only supports the Google Sheets API, but future versions will include support for YouTube and other Google services.\n\n\u003e **Disclaimer:** This package is not an official product of Google. The developers accept no responsibility for any issues, discrepancies, or damages that may arise from its use.\n\n## Requirements\n\n- PHP 7.0 or higher (including PHP 8)\n\n## Installation\n\nYou can add this package to your projects via Composer:\n\n```bash\ncomposer require ceytek-labs/google-services-lite\n```\n\n## Services\n- [Google Sheets](#google-sheets)\n    - [How to use](#google-sheets-how-to-use)\n    - [Update](#google-sheets-update)\n    - [Update in chunks](#google-sheets-update-in-chunks)\n    - [Batch update](#google-sheets-batch-update)\n    - [Batch update in chunks](#google-sheets-batch-update-in-chunks)\n\n## Google Sheets\n\nThis package offers a streamlined integration with the Google Sheets API for PHP, focusing on effortless data updates within Google Sheets. Perfect for automating and enhancing your application’s data management.\n\n### Example Usage\n\nThe following example demonstrates how to manage data in a **Google Sheets** document:\n\n**[⬆ Back to services](#services)**\n\n#### Google Sheets: How to use\n\nTo use the Google Sheets API, you need to download the required authentication file and add it to your project’s root directory. Follow the steps below to set this up:\n\n- Create a project in the Google Cloud Console.\n- Enable the Google Sheets API for your project.\n- Create authentication credentials for a \"Service Account.\"\n- Download the authentication JSON file and save it in your project’s root directory as `credentials.json`.\n- Share the email address from the service account with the Google Sheets document you want to modify, giving it edit access.\n- Don’t forget to note the sheet’s ID and the name of the tab you want to modify:\n    - `https://docs.google.com/spreadsheets/d/\u003cid\u003e`\n\n**[⬆ Back to services](#services)**\n\n#### Google Sheets: Update\n\nUpdates the specified Google Sheets tab with the provided data, replacing all existing values. It returns the number of cells that were updated.\n\n```php\nuse CeytekLabs\\GoogleServicesLite\\GoogleSheets;\n\n$result = GoogleSheets::make('SPREADSHEET_ID')    // Set the ID of the Google Sheets document\n    -\u003esetCredentials(__DIR__.'/credentials.json') // Set the authentication file\n    -\u003eupdate('Sheet1', [                          // Set the name of the tab where data will be updated\n        [\"Data 1\", \"Data 2\", \"Data 3\"],           // Add the data to be updated\n        [\"Data 4\", \"Data 5\", \"Data 6\"],\n        [\"Data 7\", \"Data 8\", \"Data 9\"],\n    ]);\n\necho 'Number of updated cells: ' . $result['updated_cells_count'];\n```\n\n**[⬆ Back to services](#services)**\n\n#### Google Sheets: Update in chunks\n\nSimilar to `update`, but handles large datasets by splitting the data into smaller chunks to prevent exceeding API limits. It returns the total number of updated cells.\n\n```php\nuse CeytekLabs\\GoogleServicesLite\\GoogleSheets;\n\n$result = GoogleSheets::make('SPREADSHEET_ID')    // Set the ID of the Google Sheets document\n    -\u003esetCredentials(__DIR__.'/credentials.json') // Set the authentication file\n    -\u003eupdateInChunks('Sheet1', [                  // Update data in smaller chunks\n        [\"Data 1\", \"Data 2\", \"Data 3\"],           // Add the data to be updated\n        [\"Data 4\", \"Data 5\", \"Data 6\"],\n        [\"Data 7\", \"Data 8\", \"Data 9\"],           // For large datasets, the data will be split into chunks\n    ], 50);                                       // Define the chunk size (e.g., 50 rows)\n\necho 'Number of updated cells: ' . $result['updated_cells_count'];\n```\n\n**[⬆ Back to services](#services)**\n\n#### Google Sheets: Batch update\n\nUpdates specific cells in a Google Sheets tab using a batch request, allowing more granular control over each cell. It returns the status of the update (success or failure).\n\n```php\nuse CeytekLabs\\GoogleServicesLite\\GoogleSheets;\n\n$result = GoogleSheets::make('SPREADSHEET_ID')    // Set the ID of the Google Sheets document\n    -\u003esetCredentials(__DIR__.'/credentials.json') // Set the authentication file\n    -\u003ebatchUpdate('Sheet1', [                     // Set the name of the tab where data will be updated\n        [\"Data 1\", \"Data 2\", \"Data 3\"],           // Add the data to be updated\n        [\"Data 4\", \"Data 5\", \"Data 6\"],\n        [\"Data 7\", \"Data 8\", \"Data 9\"],\n    ]);\n\necho 'Batch update status: ' . ($result['status'] ? 'Success' : 'Failed');\n```\n\n**[⬆ Back to services](#services)**\n\n#### Google Sheets: Batch update in chunks\n\nSimilar to `batchUpdate`, but handles large datasets by splitting the data into smaller chunks to prevent exceeding API limits. It returns the status of the update (success or failure).\n\n```php\nuse CeytekLabs\\GoogleServicesLite\\GoogleSheets;\n\n$result = GoogleSheets::make('SPREADSHEET_ID')    // Set the ID of the Google Sheets document\n    -\u003esetCredentials(__DIR__.'/credentials.json') // Set the authentication file\n    -\u003ebatchUpdateInChunks('Sheet1', [             // Update data in smaller chunks\n        [\"Data 1\", \"Data 2\", \"Data 3\"],           // Add the data to be updated\n        [\"Data 4\", \"Data 5\", \"Data 6\"],\n        [\"Data 7\", \"Data 8\", \"Data 9\"],           // For large datasets, the data will be split into chunks\n    ], 750);                                      // Define the chunk size (e.g., 750 rows)\n\necho 'Number of updated cells: ' . $result['updated_cells_count'];\n```\n\n## Contributing\n\nFeel free to submit a **pull request** or report an issue. Any contributions and feedback are highly appreciated!\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceytek-labs%2Fgoogle-services-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceytek-labs%2Fgoogle-services-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceytek-labs%2Fgoogle-services-lite/lists"}