Added support for indexing API
See https://github.com/joshcarty/google-searchconsole/issues/51 for reference
The code changes TL;DR:
- Added a new property to the WebProperty object
- Added a new Class to get the indexing information from GSC API
Works well on my side, even if data is slow to gather (this is due to how the API operates, though). I'd be happy to document better what I've done (inside the query.py file + improve the readme.md) if the change is okay for you.
Thanks!
Looks like a great start @antoineeripret - thanks for this!
Even though the API request here is quite simple, I'd be keen to preserve the querying and results interfaces as much as possible.
That would be something like:
statuses = webproperty.index_status.urls('www.example1.com', 'www.example2.com').get()
df = statuses.to_dataframe()
That would mean:
- Creating the
IndexStatusclass similarly toQueryin that its methods update an internal state andgetactually makes the request. - Create a
IndexStatusReportclass to store the results. That's where you would callto_dataframefrom. - You might want to create a separate module for those two classes.
Thanks again for this. The existing Query and Report classes should provide a good reference and let me know if I can help.
@joshcarty: applied your changes! Please let me know if that's okay, and I'll add comments + update the readme.md :)
Thanks for making those changes @antoineeripret - I'll provide more feedback this week.