Class: EcalClient::Api
- Inherits:
-
Object
- Object
- EcalClient::Api
- Defined in:
- lib/ecal_client/api.rb
Defined Under Namespace
Constant Summary collapse
- API_VERSION =
"/apiv2".freeze
- ORGANISATION =
"/organisation/".freeze
- PUBLISHER =
"/publisher/".freeze
- CALENDAR =
"/calendar/".freeze
- EVENT =
"/event/".freeze
- SUBSCRIPTION_WIDGET =
"/subscription-widget/".freeze
- SUBSCRIBER =
"/subscriber/".freeze
Instance Method Summary collapse
- #calendar ⇒ Object
- #event ⇒ Object
-
#initialize(options = {}) ⇒ Api
constructor
A new instance of Api.
- #organisation ⇒ Object
- #publisher ⇒ Object
- #subscriber ⇒ Object
- #subscription_widget ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Api
Returns a new instance of Api.
12 13 14 |
# File 'lib/ecal_client/api.rb', line 12 def initialize( = {}) = end |
Instance Method Details
#calendar ⇒ Object
24 25 26 |
# File 'lib/ecal_client/api.rb', line 24 def calendar @calendar ||= Rest.new(endpoint_for(CALENDAR), [:get, :post, :put], ) end |
#event ⇒ Object
28 29 30 |
# File 'lib/ecal_client/api.rb', line 28 def event @event ||= Rest.new(endpoint_for(EVENT), [:get, :post, :put], ) end |
#organisation ⇒ Object
16 17 18 |
# File 'lib/ecal_client/api.rb', line 16 def organisation @organisation ||= Rest.new(endpoint_for(ORGANISATION), [:get, :post, :put], ) end |
#publisher ⇒ Object
20 21 22 |
# File 'lib/ecal_client/api.rb', line 20 def publisher @publisher ||= Rest.new(endpoint_for(PUBLISHER), [:get, :put], ) end |
#subscriber ⇒ Object
36 37 38 |
# File 'lib/ecal_client/api.rb', line 36 def subscriber @subscriber ||= Rest.new(endpoint_for(SUBSCRIBER), [:get, :post, :put], ) end |
#subscription_widget ⇒ Object
32 33 34 |
# File 'lib/ecal_client/api.rb', line 32 def ||= Rest.new(endpoint_for(SUBSCRIPTION_WIDGET), [:get], ) end |