calendly 0.1.3 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -2
- data/README.md +3 -34
- data/calendly.gemspec +0 -1
- data/lib/calendly.rb +12 -4
- data/lib/calendly/api_error.rb +3 -1
- data/lib/calendly/client.rb +26 -2
- data/lib/calendly/error.rb +2 -0
- data/lib/calendly/loggable.rb +1 -1
- data/lib/calendly/models/event.rb +13 -1
- data/lib/calendly/models/event_type.rb +3 -0
- data/lib/calendly/models/invitee.rb +20 -0
- data/lib/calendly/models/invitee_question_and_answer.rb +2 -0
- data/lib/calendly/models/invitee_tracking.rb +2 -0
- data/lib/calendly/models/location.rb +52 -34
- data/lib/calendly/models/model_utils.rb +1 -0
- data/lib/calendly/models/organization.rb +30 -3
- data/lib/calendly/models/organization_invitation.rb +5 -0
- data/lib/calendly/models/organization_membership.rb +14 -1
- data/lib/calendly/models/user.rb +30 -3
- data/lib/calendly/models/webhook_subscription.rb +5 -2
- data/lib/calendly/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06ba574d911ff7447d87b9dafe93105da126e1b78cc054d1e2d220e1403961e0
|
4
|
+
data.tar.gz: 7cd7c74bd6ad8679c0f83d8832fc3da0ef81013d677186a207890194116f69eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d95d23f7acfea8d1f5884930125f9f6489fb7ab7515090a39571712d994893b6de66a880bba72425cd090dae26a3cd07bb4a12266e8de48d347a8e334ce6604
|
7
|
+
data.tar.gz: b7b7902adf506e3498d32161794f7dc871e3797e6ed307aa72d35378cd8f1837feb8ea732e79d9f21d80adb45886c1e8611fcc33d8d244987a338bfca6dd5eae
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,34 @@
|
|
1
|
-
|
2
1
|
# CHANGELOG
|
3
2
|
|
3
|
+
## 0.4.2
|
4
|
+
|
5
|
+
- add new following fields to Invitee model (refs #21)
|
6
|
+
- :rescheduled
|
7
|
+
- :old_invitee
|
8
|
+
- :new_invitee
|
9
|
+
- :cancel_url
|
10
|
+
- :reschedule_url
|
11
|
+
|
12
|
+
## 0.4.1
|
13
|
+
|
14
|
+
- support API
|
15
|
+
- `GET /event_types/{uuid}`
|
16
|
+
|
17
|
+
## 0.4.0
|
18
|
+
|
19
|
+
- fix changed Location fields such as `kind` to `type`. (refs #18)
|
20
|
+
|
21
|
+
## 0.3.0
|
22
|
+
|
23
|
+
- remove zeitwerk dependency. (refs #16)
|
24
|
+
|
25
|
+
## 0.2.0
|
26
|
+
|
27
|
+
- save fetched data in cache. (refs #14)
|
28
|
+
|
4
29
|
## 0.1.3
|
5
30
|
|
6
|
-
- support webhook APIs
|
31
|
+
- support webhook APIs (refs #9)
|
7
32
|
- `GET /webhook_subscriptions`
|
8
33
|
- `GET /webhook_subscriptions/{webhook_uuid}`
|
9
34
|
- `POST /webhook_subscriptions`
|
data/README.md
CHANGED
@@ -5,40 +5,7 @@
|
|
5
5
|
[](http://badge.fury.io/rb/calendly)
|
6
6
|
[](https://github.com/koshilife/calendly-api-ruby-client/blob/master/LICENSE.txt)
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
These client libraries are created for [Calendly v2 APIs](https://calendly.stoplight.io/docs/gh/calendly/api-docs).
|
11
|
-
|
12
|
-
As of August 2020, Calendly v2 API is currently undergoing an upgrade.
|
13
|
-
This library is trying to follow and support for the upgrade.
|
14
|
-
|
15
|
-
As of now the supported statuses each Calendly API are as below.
|
16
|
-
|
17
|
-
## Supported statuses each Calendly API
|
18
|
-
|
19
|
-
- User
|
20
|
-
- [x] Get basic information about a user
|
21
|
-
- EventType
|
22
|
-
- [ ] Get Event Type (This endpoint hasn't been released yet.)
|
23
|
-
- [x] User Event Types
|
24
|
-
- Organization
|
25
|
-
- [x] Get Organization Invitation
|
26
|
-
- [x] Get Organization Invitations
|
27
|
-
- [x] Get Organization Membership
|
28
|
-
- [x] Get a list of Organization Memberships
|
29
|
-
- [x] Invite a person to Organization
|
30
|
-
- [x] Remove a User from an Organization
|
31
|
-
- [x] Revoke Organization Invitation
|
32
|
-
- ScheduledEvent
|
33
|
-
- [x] Get Event
|
34
|
-
- [x] Get Invitee of an Event
|
35
|
-
- [x] Get List of Event Invitees
|
36
|
-
- [x] Get List of User Events
|
37
|
-
- Webhook V2
|
38
|
-
- [x] Create Webhook Subscription
|
39
|
-
- [x] Delete Webhook Subscription
|
40
|
-
- [x] Get Webhook Subscription
|
41
|
-
- [x] List Webhook Subscriptions
|
8
|
+
These client libraries are created for [Calendly v2 APIs](https://calendly.stoplight.io/).
|
42
9
|
|
43
10
|
## Installation
|
44
11
|
|
@@ -172,6 +139,8 @@ invitation = my_org.create_invitation('foobar@example.com')
|
|
172
139
|
# D, [2020-08-10T10:48:16] DEBUG -- : Response status:201, body:{"resource":{"created_at":"2020-08-10T10:48:16.051159Z","email":"foobar@example.com","last_sent_at":"2020-08-10T10:48:16.096518Z","organization":"https://api.calendly.com/organizations/ORG001","status":"pending","updated_at":"2020-08-10T10:48:16.051159Z","uri":"https://api.calendly.com/organizations/ORG001/invitations/INV001"}}
|
173
140
|
```
|
174
141
|
|
142
|
+
More in-depth method documentation can be found at [RubyDoc.info](https://www.rubydoc.info/gems/calendly/).
|
143
|
+
|
175
144
|
## Contributing
|
176
145
|
|
177
146
|
Bug reports and pull requests are welcome on [GitHub](https://github.com/koshilife/calendly-api-ruby-client). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/calendly.gemspec
CHANGED
@@ -29,7 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
31
|
spec.add_runtime_dependency 'oauth2', '>= 1.4.4'
|
32
|
-
spec.add_runtime_dependency 'zeitwerk', '>= 2.3.0'
|
33
32
|
|
34
33
|
spec.add_development_dependency 'bundler'
|
35
34
|
spec.add_development_dependency 'codecov'
|
data/lib/calendly.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
Dir[
|
4
|
+
File.join(
|
5
|
+
File.dirname(__FILE__),
|
6
|
+
'calendly',
|
7
|
+
'**',
|
8
|
+
'*'
|
9
|
+
)
|
10
|
+
].sort.each do |f|
|
11
|
+
next if File.directory? f
|
12
|
+
|
13
|
+
require f
|
14
|
+
end
|
7
15
|
|
8
16
|
# module for Calendly apis client
|
9
17
|
module Calendly
|
data/lib/calendly/api_error.rb
CHANGED
data/lib/calendly/client.rb
CHANGED
@@ -59,11 +59,21 @@ module Calendly
|
|
59
59
|
# @raise [Calendly::ApiError] if the api returns error code.
|
60
60
|
# @since 0.0.1
|
61
61
|
def current_user
|
62
|
-
|
62
|
+
return @cached_current_user if @cached_current_user
|
63
|
+
|
64
|
+
@cached_current_user = user
|
63
65
|
end
|
64
66
|
|
65
67
|
alias me current_user
|
66
68
|
|
69
|
+
# @since 0.2.0
|
70
|
+
def current_user!
|
71
|
+
@cached_current_user = nil
|
72
|
+
current_user
|
73
|
+
end
|
74
|
+
|
75
|
+
alias me! current_user!
|
76
|
+
|
67
77
|
#
|
68
78
|
# Get basic information about a user
|
69
79
|
#
|
@@ -78,6 +88,20 @@ module Calendly
|
|
78
88
|
User.new body[:resource], self
|
79
89
|
end
|
80
90
|
|
91
|
+
#
|
92
|
+
# Returns a single Event Type by its UUID.
|
93
|
+
#
|
94
|
+
# @param [String] uuid the specified event type (event type's uuid).
|
95
|
+
# @return [Calendly::EventType]
|
96
|
+
# @raise [Calendly::Error] if the uuid arg is empty.
|
97
|
+
# @raise [Calendly::ApiError] if the api returns error code.
|
98
|
+
# @since 0.4.1
|
99
|
+
def event_type(uuid)
|
100
|
+
check_not_empty uuid, 'uuid'
|
101
|
+
body = request :get, "event_types/#{uuid}"
|
102
|
+
EventType.new body[:resource], self
|
103
|
+
end
|
104
|
+
|
81
105
|
#
|
82
106
|
# Returns all Event Types associated with a specified User.
|
83
107
|
#
|
@@ -495,7 +519,7 @@ module Calendly
|
|
495
519
|
end
|
496
520
|
|
497
521
|
def check_not_empty(value, name)
|
498
|
-
raise
|
522
|
+
raise Error.new("#{name} is required.") if blank? value
|
499
523
|
end
|
500
524
|
|
501
525
|
def blank?(value)
|
data/lib/calendly/error.rb
CHANGED
data/lib/calendly/loggable.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
require 'calendly/models/event_type'
|
6
|
+
|
3
7
|
module Calendly
|
4
8
|
# Calendly's event model.
|
5
9
|
# A meeting that has been scheduled
|
@@ -79,8 +83,16 @@ module Calendly
|
|
79
83
|
# @raise [Calendly::ApiError] if the api returns error code.
|
80
84
|
# @since 0.1.0
|
81
85
|
def invitees(opts = {})
|
86
|
+
return @cached_invitees if @cached_invitees
|
87
|
+
|
82
88
|
request_proc = proc { |options| client.event_invitees uuid, options }
|
83
|
-
auto_pagination request_proc, opts
|
89
|
+
@cached_invitees = auto_pagination request_proc, opts
|
90
|
+
end
|
91
|
+
|
92
|
+
# @since 0.2.0
|
93
|
+
def invitees!(opts = {})
|
94
|
+
@cached_invitees = nil
|
95
|
+
invitees opts
|
84
96
|
end
|
85
97
|
|
86
98
|
private
|
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
require 'calendly/models/event'
|
6
|
+
|
3
7
|
module Calendly
|
4
8
|
# Calendly's Invitee model.
|
5
9
|
# An individual who has been invited to meet with a Calendly member.
|
@@ -30,6 +34,22 @@ module Calendly
|
|
30
34
|
# @return [String]
|
31
35
|
# Text (SMS) reminder phone number.
|
32
36
|
attr_accessor :text_reminder_number
|
37
|
+
# @return [Boolean]
|
38
|
+
# Indicates if this invitee has rescheduled.
|
39
|
+
# If true, a reference to the new Invitee instance is provided in the new_invitee field.
|
40
|
+
attr_accessor :rescheduled
|
41
|
+
# @return [String, nil]
|
42
|
+
# Reference to old Invitee instance that got rescheduled.
|
43
|
+
attr_accessor :old_invitee
|
44
|
+
# @return [String, nil]
|
45
|
+
# Link to new invitee, after reschedule.
|
46
|
+
attr_accessor :new_invitee
|
47
|
+
# @return [String]
|
48
|
+
# Link to cancelling the event for the invitee.
|
49
|
+
attr_accessor :cancel_url
|
50
|
+
# @return [String]
|
51
|
+
# Link to rescheduling the event for the invitee.
|
52
|
+
attr_accessor :reschedule_url
|
33
53
|
# @return [Time]
|
34
54
|
# Moment when user record was first created.
|
35
55
|
attr_accessor :created_at
|
@@ -1,52 +1,70 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/models/model_utils'
|
4
|
+
|
3
5
|
module Calendly
|
4
6
|
# Calendly's location model.
|
5
|
-
#
|
7
|
+
# The polymorphic base type for an event location that Calendly supports
|
6
8
|
class Location
|
7
9
|
include ModelUtils
|
8
10
|
|
11
|
+
#
|
9
12
|
# data patterns is below:
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
13
|
+
#
|
14
|
+
# 1. In-Person Meeting: Information about the physical (in-person) event location.
|
15
|
+
# @param [String] type Indicates that the event host (publisher) will call the invitee.
|
16
|
+
# @param [String] location The physical location specified by the event host (publisher).
|
17
|
+
#
|
18
|
+
# 2. Outbound Call: Meeting publisher will call the Invitee
|
19
|
+
# @param [String] type Indicates that the event host (publisher) will call the invitee.
|
20
|
+
# @param [String] location The phone number the event host (publisher) will use to call the invitee.
|
21
|
+
#
|
22
|
+
# 3. Inbound Call: Invitee will call meeting publisher at the specified phone number.
|
23
|
+
# @param [String] type Indicates that the invitee will call the event host.
|
24
|
+
# @param [String] location The phone number the invitee will use to call the event host (publisher).
|
25
|
+
#
|
26
|
+
# 4. Google Conference: Details about an Event that will take place using a Google Meet / Hangout conference.
|
27
|
+
# @param [String] type The event location is a Google Meet or Hangouts conference.
|
28
|
+
# @param [String] status Indicates the current status of the Google conference.
|
29
|
+
# @param [String] join_url Google conference meeting url.
|
30
|
+
#
|
31
|
+
# 5. Zoom Conference: Meeting will take place in a Zoom conference.
|
32
|
+
# @param [String] type The event location is a Zoom conference
|
33
|
+
# @param [String] status Indicates the current status of the Zoom conference.
|
34
|
+
# @param [String] join_url Zoom meeting url.
|
35
|
+
# @param [Hash] data The conference metadata supplied by Zoom.
|
36
|
+
#
|
37
|
+
# 6. GoToMeeting Conference: Details about an Event that will take place using a GotoMeeting conference
|
38
|
+
# @param [String] type The event location is a GoToMeeting conference.
|
39
|
+
# @param [String] status Indicates the current status of the GoToMeeting conference.
|
40
|
+
# @param [String] join_url GoToMeeting conference meeting url.
|
41
|
+
# @param [Hash] data The conference metadata supplied by GoToMeeting.
|
42
|
+
#
|
43
|
+
# 7. Microsoft Teams Conference:
|
44
|
+
# @param [String] type The event location is a Zoom conference.
|
45
|
+
# @param [String] status Indicates the current status of the Microsoft Teams conference.
|
46
|
+
# @param [String] join_url Microsoft Teams meeting url.
|
47
|
+
# @param [Hash] data The conference metadata supplied by Microsoft Teams.
|
48
|
+
#
|
49
|
+
# 8. Custom Location:
|
50
|
+
# Use this to describe an existing Calendly-supported event location.
|
51
|
+
# @param [String] type The event location doesn't fall into a standard category defined by the event host (publisher).
|
52
|
+
# @param [String] location The event location description provided by the invitee.
|
53
|
+
#
|
54
|
+
# 9. Invitee Specified Location:
|
55
|
+
# Information about an event location that’s specified by the invitee.
|
56
|
+
# @param [String] type The event location selected by the invitee.
|
57
|
+
# @param [String] location The event location description provided by the invitee.
|
38
58
|
#
|
39
59
|
|
40
60
|
# @return [String]
|
41
|
-
attr_accessor :
|
61
|
+
attr_accessor :type
|
42
62
|
# @return [String]
|
43
63
|
attr_accessor :location
|
44
64
|
# @return [String]
|
45
|
-
attr_accessor :
|
46
|
-
# @return [String]
|
47
|
-
attr_accessor :external_id
|
65
|
+
attr_accessor :status
|
48
66
|
# @return [String]
|
49
|
-
attr_accessor :
|
67
|
+
attr_accessor :join_url
|
50
68
|
# @return [Hash]
|
51
69
|
attr_accessor :data
|
52
70
|
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
|
3
6
|
module Calendly
|
4
7
|
# Calendly's organization model.
|
5
8
|
class Organization
|
@@ -25,8 +28,16 @@ module Calendly
|
|
25
28
|
# @raise [Calendly::ApiError] if the api returns error code.
|
26
29
|
# @since 0.1.0
|
27
30
|
def memberships(opts = {})
|
31
|
+
return @cached_memberships if @cached_memberships
|
32
|
+
|
28
33
|
request_proc = proc { |options| client.memberships uri, options }
|
29
|
-
auto_pagination request_proc, opts
|
34
|
+
@cached_memberships = auto_pagination request_proc, opts
|
35
|
+
end
|
36
|
+
|
37
|
+
# @since 0.2.0
|
38
|
+
def memberships!(opts = {})
|
39
|
+
@cached_memberships = nil
|
40
|
+
memberships opts
|
30
41
|
end
|
31
42
|
|
32
43
|
#
|
@@ -44,8 +55,16 @@ module Calendly
|
|
44
55
|
# @raise [Calendly::ApiError] if the api returns error code.
|
45
56
|
# @since 0.1.0
|
46
57
|
def invitations(opts = {})
|
58
|
+
return @cached_invitations if @cached_invitations
|
59
|
+
|
47
60
|
request_proc = proc { |options| client.invitations uuid, options }
|
48
|
-
auto_pagination request_proc, opts
|
61
|
+
@cached_invitations = auto_pagination request_proc, opts
|
62
|
+
end
|
63
|
+
|
64
|
+
# @since 0.2.0
|
65
|
+
def invitations!(opts = {})
|
66
|
+
@cached_invitations = nil
|
67
|
+
invitations opts
|
49
68
|
end
|
50
69
|
|
51
70
|
#
|
@@ -74,8 +93,16 @@ module Calendly
|
|
74
93
|
# @raise [Calendly::ApiError] if the api returns error code.
|
75
94
|
# @since 0.1.3
|
76
95
|
def webhooks(opts = {})
|
96
|
+
return @cached_webhooks if @cached_webhooks
|
97
|
+
|
77
98
|
request_proc = proc { |options| client.webhooks uri, options }
|
78
|
-
auto_pagination request_proc, opts
|
99
|
+
@cached_webhooks = auto_pagination request_proc, opts
|
100
|
+
end
|
101
|
+
|
102
|
+
# @since 0.2.0
|
103
|
+
def webhooks!(opts = {})
|
104
|
+
@cached_webhooks = nil
|
105
|
+
webhooks opts
|
79
106
|
end
|
80
107
|
|
81
108
|
#
|
@@ -1,5 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
require 'calendly/models/organization'
|
6
|
+
require 'calendly/models/user'
|
7
|
+
|
3
8
|
module Calendly
|
4
9
|
# Calendly's organization invitation model.
|
5
10
|
class OrganizationInvitation
|
@@ -1,5 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
require 'calendly/models/organization'
|
6
|
+
require 'calendly/models/user'
|
7
|
+
|
3
8
|
module Calendly
|
4
9
|
# Calendly's organization membership model.
|
5
10
|
class OrganizationMembership
|
@@ -67,10 +72,18 @@ module Calendly
|
|
67
72
|
# @raise [Calendly::ApiError] if the api returns error code.
|
68
73
|
# @since 0.1.3
|
69
74
|
def user_scope_webhooks(opts = {})
|
75
|
+
return @cached_user_scope_webhooks if @cached_user_scope_webhooks
|
76
|
+
|
70
77
|
org_uri = organization.uri if organization
|
71
78
|
user_uri = user.uri if user
|
72
79
|
request_proc = proc { |options| client.user_scope_webhooks org_uri, user_uri, options }
|
73
|
-
auto_pagination request_proc, opts
|
80
|
+
@cached_user_scope_webhooks = auto_pagination request_proc, opts
|
81
|
+
end
|
82
|
+
|
83
|
+
# @since 0.2.0
|
84
|
+
def user_scope_webhooks!(opts = {})
|
85
|
+
@cached_user_scope_webhooks = nil
|
86
|
+
user_scope_webhooks opts
|
74
87
|
end
|
75
88
|
|
76
89
|
#
|
data/lib/calendly/models/user.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
|
3
6
|
module Calendly
|
4
7
|
# Calendly's user model.
|
5
8
|
# Primary account details of a specific user.
|
@@ -57,8 +60,16 @@ module Calendly
|
|
57
60
|
# @raise [Calendly::Error] if the uri is empty.
|
58
61
|
# @since 0.1.0
|
59
62
|
def organization_membership
|
63
|
+
return @cached_organization_membership if @cached_organization_membership
|
64
|
+
|
60
65
|
mems, = client.memberships_by_user uri
|
61
|
-
mems.first
|
66
|
+
@cached_organization_membership = mems.first
|
67
|
+
end
|
68
|
+
|
69
|
+
# @since 0.2.0
|
70
|
+
def organization_membership!
|
71
|
+
@cached_organization_membership = nil
|
72
|
+
organization_membership
|
62
73
|
end
|
63
74
|
|
64
75
|
#
|
@@ -74,8 +85,16 @@ module Calendly
|
|
74
85
|
# @raise [Calendly::ApiError] if the api returns error code.
|
75
86
|
# @since 0.1.0
|
76
87
|
def event_types(opts = {})
|
88
|
+
return @cached_event_types if @cached_event_types
|
89
|
+
|
77
90
|
request_proc = proc { |options| client.event_types uri, options }
|
78
|
-
auto_pagination request_proc, opts
|
91
|
+
@cached_event_types = auto_pagination request_proc, opts
|
92
|
+
end
|
93
|
+
|
94
|
+
# @since 0.2.0
|
95
|
+
def event_types!(opts = {})
|
96
|
+
@cached_event_types = nil
|
97
|
+
event_types opts
|
79
98
|
end
|
80
99
|
|
81
100
|
#
|
@@ -95,8 +114,16 @@ module Calendly
|
|
95
114
|
# @raise [Calendly::ApiError] if the api returns error code.
|
96
115
|
# @since 0.1.0
|
97
116
|
def scheduled_events(opts = {})
|
117
|
+
return @cached_scheduled_events if @cached_scheduled_events
|
118
|
+
|
98
119
|
request_proc = proc { |options| client.scheduled_events uri, options }
|
99
|
-
auto_pagination request_proc, opts
|
120
|
+
@cached_scheduled_events = auto_pagination request_proc, opts
|
121
|
+
end
|
122
|
+
|
123
|
+
# @since 0.2.0
|
124
|
+
def scheduled_events!(opts = {})
|
125
|
+
@cached_scheduled_events = nil
|
126
|
+
scheduled_events opts
|
100
127
|
end
|
101
128
|
end
|
102
129
|
end
|
@@ -1,7 +1,10 @@
|
|
1
|
-
# Get a webhook subscription matching the provided UUID for the webhook subscription
|
2
|
-
|
3
1
|
# frozen_string_literal: true
|
4
2
|
|
3
|
+
require 'calendly/client'
|
4
|
+
require 'calendly/models/model_utils'
|
5
|
+
require 'calendly/models/organization'
|
6
|
+
require 'calendly/models/user'
|
7
|
+
|
5
8
|
module Calendly
|
6
9
|
# Calendly's webhook model.
|
7
10
|
class WebhookSubscription
|
data/lib/calendly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calendly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Koshikawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.4.4
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: zeitwerk
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 2.3.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,7 +154,7 @@ metadata:
|
|
168
154
|
homepage_uri: https://github.com/koshilife/calendly-api-ruby-client
|
169
155
|
source_code_uri: https://github.com/koshilife/calendly-api-ruby-client
|
170
156
|
changelog_uri: https://github.com/koshilife/calendly-api-ruby-client/blob/master/CHANGELOG.md
|
171
|
-
documentation_uri: https://www.rubydoc.info/gems/calendly/0.
|
157
|
+
documentation_uri: https://www.rubydoc.info/gems/calendly/0.4.2
|
172
158
|
post_install_message:
|
173
159
|
rdoc_options: []
|
174
160
|
require_paths:
|