google-my-business-api-client

1.0.0 • Public • Published

google_my_business_api

GoogleMyBusinessApi - JavaScript client for google_my_business_api The Google My Business API provides an interface for managing business location information on Google. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://google.com

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install google_my_business_api --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your google_my_business_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('google_my_business_api') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/google_my_business_api then install it via:

    npm install YOUR_USERNAME/google_my_business_api --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var GoogleMyBusinessApi = require('google_my_business_api');

var api = new GoogleMyBusinessApi.AccountsApi()

var opts = { 
  'accessToken': "accessToken_example", // {String} OAuth access token.
  'alt': "json", // {String} Data format for response.
  'callback': "callback_example", // {String} JSONP
  'fields': "fields_example", // {String} Selector specifying which fields to include in a partial response.
  'key': "key_example", // {String} API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  'oauthToken': "oauthToken_example", // {String} OAuth 2.0 token for the current user.
  'prettyPrint': true, // {Boolean} Returns response with indentations and line breaks.
  'quotaUser': "quotaUser_example", // {String} Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  'uploadProtocol': "uploadProtocol_example", // {String} Upload protocol for media (e.g. \"raw\", \"multipart\").
  'uploadType': "uploadType_example", // {String} Legacy upload protocol for media (e.g. \"media\", \"multipart\").
  'body': new GoogleMyBusinessApi.Account(), // {Account} 
  'primaryOwner': "primaryOwner_example" // {String} The resource name of the account which will be the primary owner of the account being created. It should be of the form `accounts/{account_id}/`.
};
api.mybusinessAccountsCreate(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://mybusiness.googleapis.com

Class Method HTTP request Description
GoogleMyBusinessApi.AccountsApi mybusinessAccountsCreate POST /v4/accounts
GoogleMyBusinessApi.AccountsApi mybusinessAccountsGenerateAccountNumber POST /v4/accounts/{name}:generateAccountNumber
GoogleMyBusinessApi.AccountsApi mybusinessAccountsInvitationsAccept POST /v4/accounts/{name}:accept
GoogleMyBusinessApi.AccountsApi mybusinessAccountsInvitationsDecline POST /v4/accounts/{name}:decline
GoogleMyBusinessApi.AccountsApi mybusinessAccountsInvitationsList GET /v4/accounts/{parent}/invitations
GoogleMyBusinessApi.AccountsApi mybusinessAccountsList GET /v4/accounts
GoogleMyBusinessApi.AccountsApi mybusinessAccountsListRecommendGoogleLocations GET /v4/accounts/{name}:recommendGoogleLocations
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsAdminsCreate POST /v4/accounts/{parent}/admins
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsAdminsList GET /v4/accounts/{parent}/admins
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsAssociate POST /v4/accounts/{name}:associate
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsBatchGet POST /v4/accounts/{name}/locations:batchGet
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsBatchGetReviews POST /v4/accounts/{name}/locations:batchGetReviews
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsClearAssociation POST /v4/accounts/{name}:clearAssociation
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsCreate POST /v4/accounts/{parent}/locations
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsFetchVerificationOptions POST /v4/accounts/{name}:fetchVerificationOptions
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsFindMatches POST /v4/accounts/{name}:findMatches
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsGetGoogleUpdated GET /v4/accounts/{name}:googleUpdated
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsList GET /v4/accounts/{parent}/locations
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsLocalPostsCreate POST /v4/accounts/{parent}/localPosts
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsLocalPostsList GET /v4/accounts/{parent}/localPosts
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsLocalPostsReportInsights POST /v4/accounts/{name}/localPosts:reportInsights
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsMediaCreate POST /v4/accounts/{parent}/media
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsMediaCustomersList GET /v4/accounts/{parent}/media/customers
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsMediaList GET /v4/accounts/{parent}/media
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsMediaStartUpload POST /v4/accounts/{parent}/media:startUpload
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsAnswersDelete DELETE /v4/accounts/{parent}/answers:delete
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsAnswersList GET /v4/accounts/{parent}/answers
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsAnswersUpsert POST /v4/accounts/{parent}/answers:upsert
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsCreate POST /v4/accounts/{parent}/questions
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsDelete DELETE /v4/accounts/{name}
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsList GET /v4/accounts/{parent}/questions
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsQuestionsPatch PATCH /v4/accounts/{name}
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsReportInsights POST /v4/accounts/{name}/locations:reportInsights
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsReviewsDeleteReply DELETE /v4/accounts/{name}/reply
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsReviewsList GET /v4/accounts/{parent}/reviews
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsReviewsUpdateReply PUT /v4/accounts/{name}/reply
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsTransfer POST /v4/accounts/{name}:transfer
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsVerificationsComplete POST /v4/accounts/{name}:complete
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsVerificationsList GET /v4/accounts/{parent}/verifications
GoogleMyBusinessApi.AccountsApi mybusinessAccountsLocationsVerify POST /v4/accounts/{name}:verify
GoogleMyBusinessApi.AccountsApi mybusinessAccountsUpdateNotifications PUT /v4/accounts/{name}
GoogleMyBusinessApi.AttributesApi mybusinessAttributesList GET /v4/attributes
GoogleMyBusinessApi.CategoriesApi mybusinessCategoriesBatchGet GET /v4/categories:batchGet
GoogleMyBusinessApi.CategoriesApi mybusinessCategoriesList GET /v4/categories
GoogleMyBusinessApi.ChainsApi mybusinessChainsGet GET /v4/accounts/{name}
GoogleMyBusinessApi.ChainsApi mybusinessChainsSearch GET /v4/chains:search
GoogleMyBusinessApi.GoogleLocationsApi mybusinessGoogleLocationsReport POST /v4/accounts/{name}:report
GoogleMyBusinessApi.GoogleLocationsApi mybusinessGoogleLocationsSearch POST /v4/googleLocations:search

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Readme

Keywords

none

Package Sidebar

Install

npm i google-my-business-api-client

Weekly Downloads

0

Version

1.0.0

License

Creative Commons Attribution 3.0

Unpacked Size

1.85 MB

Total Files

463

Last publish

Collaborators

  • dmitrymelnik