{"id":44556893,"url":"https://github.com/codedbychavez/vue3-googleapis","last_synced_at":"2026-02-13T21:48:12.808Z","repository":{"id":65561198,"uuid":"526532508","full_name":"codedbychavez/vue3-googleapis","owner":"codedbychavez","description":"Install the npm package from: https://www.npmjs.com/package/vue3-googleapis","archived":false,"fork":false,"pushed_at":"2022-08-19T10:53:34.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T12:06:34.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/codedbychavez.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}},"created_at":"2022-08-19T08:54:03.000Z","updated_at":"2024-05-03T18:44:05.000Z","dependencies_parsed_at":"2023-01-29T16:35:10.602Z","dependency_job_id":null,"html_url":"https://github.com/codedbychavez/vue3-googleapis","commit_stats":null,"previous_names":["chavezharris96/vue3-googleapis","chavezrharris/vue3-googleapis","codedbychavez/vue3-googleapis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codedbychavez/vue3-googleapis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fvue3-googleapis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fvue3-googleapis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fvue3-googleapis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fvue3-googleapis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedbychavez","download_url":"https://codeload.github.com/codedbychavez/vue3-googleapis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fvue3-googleapis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29419420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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":[],"created_at":"2026-02-13T21:48:12.308Z","updated_at":"2026-02-13T21:48:12.784Z","avatar_url":"https://github.com/codedbychavez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue3-googleapis\n\n[![npm version](https://badge.fury.io/js/vue3-googleapis.svg)](https://www.npmjs.com/package/vue3-googleapis)\n\nA simple and easy to use wrapper plugin for adding the Google API JavaScript client to your Vue3 application. This plugin is an upgrade to https://www.npmjs.com/package/vue-googleapis\n\n## About\n\nThis plugin is basically a wrapper around Google's API JavaScript Client.\n\n## Installation\n\n```sh\nnpm install --save vue3-googleapis\n```\n\n## Initialization\n\n- Import the plugin in `main.js`\n\n```js\nimport gapiPlugin from 'vue3-googleapis'\n```\n\n- Then do:\n\n```js\napp.use(gapiPlugin, {\n  apiKey: '\u003cGOOGLE_PROJECT_API_KEY\u003e',\n  clientId: '\u003cCLIENT_ID\u003e.apps.googleusercontent.com',\n  discoveryDocs: ['https://mybusinessbusinessinformation.googleapis.com/$discovery/rest?version=v1'],\n  scope: 'https://www.googleapis.com/auth/business.manage email'\n})\n```\n\n### Hints\n\n#### Scope\n\n- To use a single scope you can do:\n\n```js\n  scope: 'https://www.googleapis.com/auth/business.manage'\n```\n\n#### API Discovery Docs\n\n- Using the docs makes using this JavaScript client simple. Here is an example that uses the **mybusinessbusinessinformation** API discovery document for creating a new business location:\n\n1. Under the resources key: \n\n```json\n{\n  \"resources\": {\n    \"categories\": {\n      \"methods\": {\n        \"list\": {},\n        \"create\": {\n          \"parameters\": {\n            \"parent\": {\n              \"description\": \"Required. The name of the account in which to create this location.\",\n              \"type\": \"string\",\n              \"pattern\": \"^accounts/[^/]+$\",\n              \"location\": \"path\",\n              \"required\": true\n            }\n          },\n          \"request\" {\n            \"$ref\": \"Location\"\n          }\n        }\n      }\n    }\n  }\n}\n\n```\n\n2. Expand the method, to find what parameters are supported as shown above. \n- `parent` is a required parameter.\n- The `request` body should contain a [location object](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location)\n\n- With this in mind, here is how you can create a Google business location using the client: \n\n```js\n    const location = {\n        language_code: \"en\",\n        title: \"Joe's Burgers\",\n        categories: {\n            primaryCategory: {\n            name: \"categories/gcid:fast_food_restaurant\",\n            displayName: \"Fast food restaurant\",\n          },\n        },\n        storefront_address: {\n          regionCode: \"GY\",\n          languageCode: \"en\",\n          locality: \"Georgetown\",\n          addressLines: [\"123 Stanley drive\"],\n        },\n        website_uri: \"https://www.joesburger.com\",\n      },\n\n    async handleCreateLocation(e) {\n      e.preventDefault();\n      const response =\n        await this.$google.api.client.mybusinessbusinessinformation.accounts.locations.create(\n          {\n            parent: `accounts/${userId}`,\n            resource: location,\n          }\n        );\n      console.log(response);\n    },\n```\n\n3. Feel free to browse the code in [https://github.com/codedbychavez/vue3-googleapis-sample](https://github.com/codedbychavez/vue3-googleapis-sample) for example usages in a vue3 application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fvue3-googleapis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedbychavez%2Fvue3-googleapis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fvue3-googleapis/lists"}