Class: GoogleAppsApi::CalendarResources::Api

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/google_apps_api/calendar_resources.rb

Instance Attribute Summary (collapse)

Attributes inherited from BaseApi

#domain

Instance Method Summary (collapse)

Methods inherited from BaseApi

#entity

Constructor Details

- (Api) initialize(*args)

Returns a new instance of Api



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/google_apps_api/calendar_resources.rb', line 11

def initialize(*args)
  begin
    action_list = {
      :domain_login => [:post, ":auth:/accounts/ClientLogin"],
      :retrieve_all_resources => [:get, ":feed_basic:/"],
    }
  end


  options = args.extract_options!

  domain = options[:domain]

  options.merge!(:action_hash => action_list, :auth => "https://www.google.com", :feed => "https://apps-apis.google.com", :service => "apps")
  options[:feed_basic] = options[:feed]+ "/a/feeds/calendar/resource/2.0/#{domain}"

  super(options)
end

Instance Attribute Details

- (Object) token (readonly)

Returns the value of attribute token



9
10
11
# File 'lib/google_apps_api/calendar_resources.rb', line 9

def token
  @token
end