Class: Calendlyr::Client
- Inherits:
-
Object
- Object
- Calendlyr::Client
- Defined in:
- lib/calendlyr/client.rb
Constant Summary collapse
- BASE_URL =
"https://api.calendly.com"
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #data_compliance ⇒ Object
- #event_invitees ⇒ Object
- #event_types ⇒ Object
- #events ⇒ Object
-
#initialize(token:) ⇒ Client
constructor
A new instance of Client.
-
#inspect ⇒ Object
Avoid returning #<Calendlyr::Client @token=“token” …>.
- #me(force_reload: false) ⇒ Object
- #organization ⇒ Object
- #organizations ⇒ Object
- #scheduling_links ⇒ Object
- #users ⇒ Object
- #webhooks ⇒ Object
Constructor Details
#initialize(token:) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/calendlyr/client.rb', line 7 def initialize(token:) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
5 6 7 |
# File 'lib/calendlyr/client.rb', line 5 def token @token end |
Instance Method Details
#data_compliance ⇒ Object
48 49 50 |
# File 'lib/calendlyr/client.rb', line 48 def data_compliance DataComplianceResource.new(self) end |
#event_invitees ⇒ Object
36 37 38 |
# File 'lib/calendlyr/client.rb', line 36 def event_invitees EventInviteeResource.new(self) end |
#event_types ⇒ Object
28 29 30 |
# File 'lib/calendlyr/client.rb', line 28 def event_types EventTypeResource.new(self) end |
#events ⇒ Object
32 33 34 |
# File 'lib/calendlyr/client.rb', line 32 def events EventResource.new(self) end |
#inspect ⇒ Object
Avoid returning #<Calendlyr::Client @token=“token” …>
53 54 55 |
# File 'lib/calendlyr/client.rb', line 53 def inspect "#<Calendlyr::Client>" end |
#me(force_reload: false) ⇒ Object
11 12 13 14 |
# File 'lib/calendlyr/client.rb', line 11 def me(force_reload: false) @me = nil if force_reload @me ||= users.me end |
#organization ⇒ Object
16 17 18 |
# File 'lib/calendlyr/client.rb', line 16 def organization me.organization end |
#organizations ⇒ Object
24 25 26 |
# File 'lib/calendlyr/client.rb', line 24 def organizations OrganizationResource.new(self) end |
#scheduling_links ⇒ Object
40 41 42 |
# File 'lib/calendlyr/client.rb', line 40 def scheduling_links SchedulingLinkResource.new(self) end |
#users ⇒ Object
20 21 22 |
# File 'lib/calendlyr/client.rb', line 20 def users UserResource.new(self) end |
#webhooks ⇒ Object
44 45 46 |
# File 'lib/calendlyr/client.rb', line 44 def webhooks WebhookResource.new(self) end |