@maxim_mazurok/gapi.client.mybusinessplaceactions-v1
v0.2.20260805
Published
TypeScript typings for My Business Place Actions API v1
Readme
TypeScript typings for My Business Place Actions API v1
The My Business Place Actions API provides an interface for managing place action links of a location on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access. For detailed description please check documentation.
Installing
Install typings for My Business Place Actions API:
npm install @types/gapi.client.mybusinessplaceactions-v1 --save-devTypeScript 6.0+
TypeScript 6.0 changed types to default to []. You must now explicitly list type packages in tsconfig.json:
{
"compilerOptions": {
"types": [
"gapi",
"gapi.auth2",
"gapi.client",
"gapi.client.mybusinessplaceactions-v1"
]
}
}Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
// now we can use gapi.client
// ...
});Then load api client wrapper:
gapi.client.load(
'https://mybusinessplaceactions.googleapis.com/$discovery/rest?version=v1',
() => {
// now we can use:
// gapi.client.mybusinessplaceactions
},
);// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('mybusinessplaceactions', 'v1', () => {
// now we can use:
// gapi.client.mybusinessplaceactions
});After that you can use My Business Place Actions API resources:
/*
Returns the list of available place action types for a location or country.
*/
await gapi.client.mybusinessplaceactions.placeActionTypeMetadata.list({});For provenance information see Provenance section on NPM
