Project

General

Profile

Google calendar with google-api-client and oauth

Added by Markus Færevaag over 10 years ago

Hi,

I would like to create a plugin that signs into my Google app via oauth.

Now, I have seen solutions with just oauth, but I would like to use the google-api-client. With this I can then easily make API calls and to calendars etc.

I have tried to follow this blog post, but seem to run into some difficulties as I am making a plugin, not an app. The difference from the blog and my implementation is that I have moved the gems into the plugins Gemfile and the OmniAuth initializer into 'lib/omniauth/builder' and require it manually in the start of my init.rb file. This gives a uninitialized constant OmniAuth::Builder (NameError).

EDIT: I've dropped using OmniAuth, as it wasn't really necessary. So, now I'm trying to do more like this google-api-client-sample. Any suggestions to how to structure the code in an MVC paradigm? A GoogleClient singleton?

As there's not much documentation on Rails plugins for Redmine, I was hoping there was someone who could guide me a bit on how making a good solution for my issue. There might be more questions as the development moves forward, but I'll come back to that when I get there.

Much appreciate all the help I can get :-)

Markus