dataforseo / TypeScriptClient

MIT License
4 stars 1 forks source link

Missing "live" version of Business Data Google My Business Info #2

Closed BenJackGill closed 1 week ago

BenJackGill commented 2 weeks ago

This client is missing the Google My Business Info Live types and endpoints.

It has endpoints for Task POST, Task GET, and Tasks Ready - but not the Live version.

Therefore we cannot do something like this, as per the docs of this client in the README:

import * as client from "dataforseo-client";

const businessDataApi = new client.BusinessDataApi(
  "https://api.dataforseo.com",
  {
    fetch: authFetch,
  },
);

let task = new client.BusinessDataGoogleMyBusinessInfoLiveTaskInfo(); // < --- THIS IS NOT FOUND
task.location_name = "New York,New York,United States";
task.language_code = "en";
task.keyword = "RustyBrick, Inc.";

const resp = await businessDataApi.googleMyBusinessInfoLive(task);  // < --- THIS IS NOT FOUND
lVics commented 1 week ago

thanks for noticing the issue. that endpoint added in new latest version (1.0.19) code example:

    const authFetch = createAuthenticatedFetch(username, password);
    let businessDataApi= new client.BusinessDataApi("https://api.dataforseo.com", { fetch: authFetch });

    let task = new client.BusinessDataTaskRequestInfo();
    task.location_name = "New York,New York,United States";
    task.language_code = "en";
    task.keyword = "RustyBrick, Inc.";

    let resp = await businessDataApi.googleMyBusinessInfoLive([task]);