rikai / Showbot

🤖 An omnipresent multi-platform bot who's goal in life is become Skynet 🤖
MIT License
40 stars 18 forks source link

Migrate to google-api-client 0.9.x #73

Open rikai opened 7 years ago

rikai commented 7 years ago

There were some fairly extensive changes to the API client as documented here. This will require a fair amount of work to update.

We should, however, update to the latest release to make sure we're working against the google APIs properly and minimise potential issues and the use of outdated code.

ObserverHerb commented 7 years ago

Come to think of it I should probably just post this here. What parts of JBot utilize the google-api-client? Which features?

s0ph0s-2 commented 7 years ago

That would be the calendar integration in lib/models/calendar.rb

I think that ties into the !next command...

On Dec 3, 2016, 15:24 -0500, Herb Miller Jr. notifications@github.com, wrote:

Come to think of it I should probably just post this here. What parts of JBot utilize the google-api-client? Which features? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

rikai commented 7 years ago

It does indeed

s0ph0s-2 commented 7 years ago

If nobody is working on this, I'll take it. I dug through the calendar code to understand what was going on, so I'm fairly confident I can knock this one out.

rikai commented 7 years ago

Sounds great! Nobody is working on it at current, as far as i know.

The google api client is on v0.11.3 as per the changelog now, but most of the post 0.9 stuff doesn't seem to affect us. That MIGRATING.md will probably be pretty handy.

Note: This will also mean that we are dropping support for ruby < 2.0, so if we define anything that relies on that anywhere still or calls out the ability to use it on pre-2.0, we might look at creating issues pointing those things out and/or updating that minimum version information if it's simple.

If you're going to be in this area of the code, it might be nice to look at what the minimal amount of code needed would be to give us access to things like the googleauth stuff. It's not something we're going to be actively using out of the gate, but if it requires any implementation effort, it'd be nice to get it knocked out early, because it will almost certainly be required for various future projects. This is more of a 'tangential stretch goal' than anything though, so if you don't care to bother with it, that's perfectly fine too! 👍

s0ph0s-2 commented 7 years ago

I've architected my changes in such a way that adding googleauth later won't require that they be redone. I did look into how much additional code would be required for that, but I don't really understand how that library works, so I can't say for certain. At a rough estimate, I'd say 20±10 lines of additional code.