How to use the google-ads-node.GenerateHistoricalMetricsRequest function in google-ads-node

To help you get started, we’ve selected a few google-ads-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Opteo / google-ads-api / src / services / keyword_plan.ts View on Github external
public async generateHistoricalMetrics(id: number | string): Promise {
        const request = new GenerateHistoricalMetricsRequest()
        request.setKeywordPlan(`customers/${this.cid}/${RESOURCE_URL_NAME}/${id}`)
        const response = await this.service.generateHistoricalMetrics(request)
        const [parsed] = this.parseServiceResults([response]) as GenerateHistoricalMetricsResponse[]
        return parsed
    }
}