I'm using the SDK to build a tap for Google Search...
# singer-tap-development
a
I'm using the SDK to build a tap for Google Search Console api that can accept a service account credential. I'm using the
googleapiclient
library rather than a more traditional rest stream with structured URL, so I'm just passing a dict to a function like so to get my json:
Copy code
self.authenticator.service.searchanalytics().query(
                siteUrl=self.config['site_url'],
                body = body
            )
What I need to to is create a date range between start and end dates, and then pass each date to the api as a query parameter in the body. How can I store the last queried in a state file. For instance, if I've already ran the from 2023-11-01 up to 2023-11-19, then when I run again tonight, I should only collect data for
2023-11-20
as my state file tells me I've ran up to
2023-11-19
already? I was going to mutate
context
but the docs advise specifically against that.