calendly 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5890f2e5488593ef1b1edcc4284abb1d50442fe66a782322aff7990d3a1d9424
4
- data.tar.gz: de8d74e6d9b4b588cca90dc075b74d497ddb92f1cc4ca22db71e15f0da01d8ac
3
+ metadata.gz: 7ba1370ffbfb35b34a37f514d94f48879a20a2ee5b33ebb1791969883a7303a7
4
+ data.tar.gz: 5deec005ae70cdbf6f864c7ed7eec03d8186ef3127452f4221e9c9e3863f7c8d
5
5
  SHA512:
6
- metadata.gz: 91ed1a2beab52e4e92bc6b1c068323ad882cdef5bf7f74f538ef3919d1cae64139da374471e68200c644571b235a12e8c69ccb74086a1834113add6ebe93dd56
7
- data.tar.gz: a3a596cfb67f401756b2f913598845003d3b17c861d292da9706f630ff0028c07e97b52e9b7b989b0853be16f09de9c33c4570c71c8c8bc28fd96fc26d4040d8
6
+ metadata.gz: 9de051c920eb9480c7c337829c75d4a81ce8690fb95c30ba0e8a493677886de52581bbae1d4dc926274f1a6ccb0dfcecf6ea184770b358c3fccf948d64a8d459
7
+ data.tar.gz: a4f7068f0bbddf86699506133cebbeb1a8871a9f7523eac8e67e443a458367f1f5fc3de10b6d078801f8d502efe31bd20fb6c5d52fcbb0c588024b8ca1625fab
data/CHANGELOG.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.7.0
4
+
5
+ - supported a signing key parameter when creating webhooks. (#33)
6
+ - changed `user_uri` argument to keyword argument on Client#create_webhook.
7
+
3
8
  ## 0.6.0
4
9
 
5
- - supported to new features until April 2021. (#29)
10
+ - supported new features until April 2021. (#29)
6
11
  - Client
7
12
  - (Change) support organization options in `event_types` api.
8
13
  - (Rename) `event_types` to `event_types_by_user`
@@ -11,6 +16,9 @@
11
16
  - (Add method) webhooks
12
17
  - (Add method) webhooks!
13
18
  - (Add method) create_webhook
19
+ - Organization model
20
+ - (Add method) event_types
21
+ - (Add method) event_types!
14
22
  - Event model
15
23
  - (Remove field) invitees_counter_total
16
24
  - (Remove field) invitees_counter_active
@@ -520,19 +520,22 @@ module Calendly
520
520
  # @param [String] url Canonical reference (unique identifier) for the resource.
521
521
  # @param [Array<String>] events List of user events to subscribe to. options: invitee.created or invitee.canceled
522
522
  # @param [String] org_uri The unique reference to the organization that the webhook will be tied to.
523
- # @param [String] user_uri The unique reference to the user that the webhook will be tied to.
523
+ # @param [String] user_uri The unique reference to the user that the webhook will be tied to. Optional.
524
+ # @param [String] signing_key secret key shared between your application and Calendly. Optional.
524
525
  # @return [Calendly::WebhookSubscription]
525
526
  # @raise [Calendly::Error] if the url arg is empty.
526
527
  # @raise [Calendly::Error] if the events arg is empty.
527
528
  # @raise [Calendly::Error] if the org_uri arg is empty.
528
529
  # @raise [Calendly::ApiError] if the api returns error code.
529
530
  # @since 0.1.3
530
- def create_webhook(url, events, org_uri, user_uri = nil)
531
+ def create_webhook(url, events, org_uri, user_uri: nil, signing_key: nil) # rubocop:disable Metrics/ParameterLists
531
532
  check_not_empty url, 'url'
532
533
  check_not_empty events, 'events'
533
534
  check_not_empty org_uri, 'org_uri'
534
535
 
535
536
  params = {url: url, events: events, organization: org_uri}
537
+ params[:signing_key] = signing_key if signing_key
538
+
536
539
  if user_uri
537
540
  params[:scope] = 'user'
538
541
  params[:user] = user_uri
@@ -165,14 +165,15 @@ module Calendly
165
165
  #
166
166
  # @param [String] url Canonical reference (unique identifier) for the resource.
167
167
  # @param [Array<String>] events List of user events to subscribe to. options: invitee.created or invitee.canceled
168
+ # @param [String] signing_key secret key shared between your application and Calendly. Optional.
168
169
  # @return [Calendly::WebhookSubscription]
169
170
  # @raise [Calendly::Error] if the url arg is empty.
170
171
  # @raise [Calendly::Error] if the events arg is empty.
171
172
  # @raise [Calendly::Error] if the uri is empty.
172
173
  # @raise [Calendly::ApiError] if the api returns error code.
173
174
  # @since 0.1.3
174
- def create_webhook(url, events)
175
- client.create_webhook url, events, uri
175
+ def create_webhook(url, events, signing_key: nil)
176
+ client.create_webhook url, events, uri, signing_key: signing_key
176
177
  end
177
178
  end
178
179
  end
@@ -89,14 +89,15 @@ module Calendly
89
89
  #
90
90
  # @param [String] url Canonical reference (unique identifier) for the resource.
91
91
  # @param [Array<String>] events List of user events to subscribe to. options: invitee.created or invitee.canceled
92
+ # @param [String] signing_key secret key shared between your application and Calendly. Optional.
92
93
  # @return [Calendly::WebhookSubscription]
93
94
  # @raise [Calendly::Error] if the url arg is empty.
94
95
  # @raise [Calendly::Error] if the events arg is empty.
95
96
  # @raise [Calendly::Error] if the organization.uri is empty.
96
97
  # @raise [Calendly::ApiError] if the api returns error code.
97
98
  # @since 0.1.3
98
- def create_user_scope_webhook(url, events)
99
- user.create_webhook url, events
99
+ def create_user_scope_webhook(url, events, signing_key: nil)
100
+ user.create_webhook url, events, signing_key: signing_key
100
101
  end
101
102
 
102
103
  private
@@ -174,15 +174,16 @@ module Calendly
174
174
  #
175
175
  # @param [String] url Canonical reference (unique identifier) for the resource.
176
176
  # @param [Array<String>] events List of user events to subscribe to. options: invitee.created or invitee.canceled
177
+ # @param [String] signing_key secret key shared between your application and Calendly. Optional.
177
178
  # @return [Calendly::WebhookSubscription]
178
179
  # @raise [Calendly::Error] if the url arg is empty.
179
180
  # @raise [Calendly::Error] if the events arg is empty.
180
181
  # @raise [Calendly::Error] if the organization.uri is empty.
181
182
  # @raise [Calendly::ApiError] if the api returns error code.
182
183
  # @since 0.6.0
183
- def create_webhook(url, events)
184
+ def create_webhook(url, events, signing_key: nil)
184
185
  org_uri = current_organization&.uri
185
- client.create_webhook url, events, org_uri, uri
186
+ client.create_webhook url, events, org_uri, user_uri: uri, signing_key: signing_key
186
187
  end
187
188
  end
188
189
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Calendly
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-30 00:00:00.000000000 Z
11
+ date: 2021-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -161,7 +161,7 @@ metadata:
161
161
  homepage_uri: https://github.com/koshilife/calendly-api-ruby-client
162
162
  source_code_uri: https://github.com/koshilife/calendly-api-ruby-client
163
163
  changelog_uri: https://github.com/koshilife/calendly-api-ruby-client/blob/master/CHANGELOG.md
164
- documentation_uri: https://www.rubydoc.info/gems/calendly/0.6.0
164
+ documentation_uri: https://www.rubydoc.info/gems/calendly/0.7.0
165
165
  post_install_message:
166
166
  rdoc_options: []
167
167
  require_paths: