Class: GoogleCalendar::Client
- Inherits:
-
Object
- Object
- GoogleCalendar::Client
- Extended by:
- Connection
- Defined in:
- lib/google_calendar_oauth2/client.rb
Instance Method Summary collapse
-
#initialize(client_id, client_secret, redirect_uri) ⇒ Client
constructor
A new instance of Client.
- #redirect_to ⇒ Object
Methods included from Connection
Constructor Details
#initialize(client_id, client_secret, redirect_uri) ⇒ Client
Returns a new instance of Client.
17 18 19 20 21 22 23 |
# File 'lib/google_calendar_oauth2/client.rb', line 17 def initialize(client_id, client_secret, redirect_uri) GoogleCalendar.connection = Google::APIClient.new GoogleCalendar.connection..client_id = client_id GoogleCalendar.connection..client_secret = client_secret GoogleCalendar.connection..scope = 'https://www.googleapis.com/auth/calendar' GoogleCalendar.connection..redirect_uri = redirect_uri end |
Instance Method Details
#redirect_to ⇒ Object
25 26 27 |
# File 'lib/google_calendar_oauth2/client.rb', line 25 def redirect_to GoogleCalendar.connection...to_s end |