joshcarty / google-searchconsole

A wrapper for the Google Search Console API.
MIT License
223 stars 80 forks source link

Search Console API changes #28

Closed tomfbush closed 3 years ago

tomfbush commented 3 years ago

Hi there

I noticed that there are some changes to the Search Console API potentially coming in very shortly, and detailed at https://developers.google.com/search/blog/2020/12/search-console-api-updates?hl=en#python

They don't seem to be massive, namely changing webmasters_service = build('webmasters', 'v3', http=http) to webmasters_service = build('searchconsole', 'v1', http=http) but thought I would flag in case this is a breaking change to auth.py.

I'm not exactly 100% comfortable with Github and would like to see if others agree with my understanding as I have several bits of code in production that depend on this very helpful package!

Tom

joshcarty commented 3 years ago

Reading this it looks like we should definitely do this!

If you're querying the Search Console API using an external API library, or querying the Webmasters API discovery document directly you will need to take action as we'll drop the support in the Webmasters discovery document. Our current plan is to support it until December 31, 2020 - but we'll provide more details and guidance in the coming months.

You're right it is only a small change. Would you like to have a go at it yourself?

The steps you would need to do are:

  1. Fork the repository on GitHub to give you a copy you can edit.
  2. Clone yourself a local copy of your fork with git.
  3. Create a new branch (call it whatever you like) with git.
  4. Make the change to auth.py you describe above.
  5. Add and commit your change with a descriptive commit message.
  6. Push the change.
  7. Choose Compare & Pull Request on GitHub.
  8. Create a Pull Request to this repository that I can approve.

Let me know if you're keen to have a go at this and I'm happy to answer any questions. Otherwise, I'll make sure it's done for 1 January.

tomfbush commented 3 years ago

That all seems very doable. I'll sort it in the morning first thing! Thanks Josh :smile:

joshcarty commented 3 years ago

Thanks for this @tomfbush!