/* This is stub file for gapi.client.{{=it.name}} definition tests */ /* IMPORTANT. * This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. * In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator **/ gapi.load('client', () => { /** now we can use gapi.client */ gapi.client.load('doubleclickbidmanager', 'v1', () => { /** now we can use gapi.client.doubleclickbidmanager */ /** don't forget to authenticate your client before sending any request to resources: */ /** declare client_id registered in Google Developers Console */ const client_id = '<>'; const scope = [ /** View and manage your reports in DoubleClick Bid Manager */ 'https://www.googleapis.com/auth/doubleclickbidmanager', ]; const immediate = true; gapi.auth.authorize({ client_id, scope, immediate }, authResult => { if (authResult && !authResult.error) { /** handle succesfull authorization */ run(); } else { /** handle authorization error */ } }); run(); }); async function run() { /** Retrieves line items in CSV format. */ await gapi.client.lineitems.downloadlineitems({ }); /** Uploads line items in CSV format. */ await gapi.client.lineitems.uploadlineitems({ }); /** Creates a query. */ await gapi.client.queries.createquery({ }); /** Deletes a stored query as well as the associated stored reports. */ await gapi.client.queries.deletequery({ queryId: "queryId", }); /** Retrieves a stored query. */ await gapi.client.queries.getquery({ queryId: "queryId", }); /** Retrieves stored queries. */ await gapi.client.queries.listqueries({ }); /** Runs a stored query to generate a report. */ await gapi.client.queries.runquery({ queryId: "queryId", }); /** Retrieves stored reports. */ await gapi.client.reports.listreports({ queryId: "queryId", }); /** Retrieves entities in SDF format. */ await gapi.client.sdf.download({ }); } });