Hi, We're currently migrating from the Adwords API to the Google Ads API. The reports we generate from the Adwords API include the "Date" and "Week" fields within the data for a given date constant. We understand that we won't receive data for segments where the metrics are zero within the new Google Ads API. Therefore, we are making two requests, one for the base data without any segmentation and one for any data available when segmented. We are then zipping these together to recreate our existing data.
However, when the API returns no results for the segmented data or includes results for multiple dates, it's duplicating your logic to create a map that produces all of the possible dates within a given Date Constant. Therefore, we're looking for a way to create all available dates within a given Date Constant. For example, if we were to look up YESTERDAY, it would return a single date; if we were to look up LAST_30_DAYS, it would return each date within the last 30 days, allowing us to map our data to recreate all possible iterations. An example might look like this: ``` const possibleDates = getDates('LAST_30_DAYS') possibleDates.map(( date ) => { return results.map((result) => { return { ...result, date: date } }) }) ``` Is this possible within your API? Or is there any way to always return results regardless of empty metrics? Kind Regards, Luke -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/98b34f98-076e-446a-b992-27272bd1bf01n%40googlegroups.com.