Class: GoogleCalendarApiV2::Client
- Inherits:
-
Object
- Object
- GoogleCalendarApiV2::Client
- Defined in:
- lib/google_calendar_api_v2/client.rb
Constant Summary collapse
- HEADERS =
{'Content-Type' => 'application/json', 'GData-Version' => '2.6'}
Instance Attribute Summary collapse
-
#calendars ⇒ Object
readonly
Returns the value of attribute calendars.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(consumer_key, consumer_secret, token, token_secret) ⇒ Client
constructor
Initialize this class with :consumer_key, :consumer_secret, :token, :token_secret.
Constructor Details
#initialize(consumer_key, consumer_secret, token, token_secret) ⇒ Client
Initialize this class with :consumer_key, :consumer_secret, :token, :token_secret
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/google_calendar_api_v2/client.rb', line 10 def initialize(consumer_key, consumer_secret, token, token_secret) consumer = OAuth::Consumer.new(consumer_key, consumer_secret, { :site => "https://www.google.com", :scheme => :header }) @connection = OAuth::AccessToken.new(consumer,token, token_secret) @calendars = Calendar.new(@connection) end |
Instance Attribute Details
#calendars ⇒ Object (readonly)
Returns the value of attribute calendars.
5 6 7 |
# File 'lib/google_calendar_api_v2/client.rb', line 5 def calendars @calendars end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
5 6 7 |
# File 'lib/google_calendar_api_v2/client.rb', line 5 def connection @connection end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
5 6 7 |
# File 'lib/google_calendar_api_v2/client.rb', line 5 def events @events end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/google_calendar_api_v2/client.rb', line 5 def headers @headers end |