calendlyr 0.3.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +3 -27
- data/Gemfile +1 -5
- data/README.md +47 -20
- data/bin/console +3 -3
- data/{calendly.gemspec → calendlyr.gemspec} +3 -3
- data/lib/{calendly → calendlyr}/client.rb +9 -9
- data/lib/{calendly → calendlyr}/collection.rb +4 -1
- data/lib/{calendly → calendlyr}/error.rb +1 -1
- data/lib/{calendly → calendlyr}/object.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/event_invitees.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/event_types.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/events.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/invitations.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/memberships.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/organizations.rb +9 -1
- data/lib/{calendly → calendlyr}/objects/scheduling_links.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/users.rb +1 -1
- data/lib/{calendly → calendlyr}/objects/webhooks.rb +1 -1
- data/lib/{calendly → calendlyr}/resource.rb +13 -25
- data/lib/{calendly → calendlyr}/resources/data_compliance.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/event_invitees.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/event_types.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/events.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/organizations.rb +2 -2
- data/lib/{calendly → calendlyr}/resources/scheduling_links.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/users.rb +1 -1
- data/lib/{calendly → calendlyr}/resources/webhooks.rb +1 -1
- data/lib/calendlyr/version.rb +3 -0
- data/lib/calendlyr.rb +30 -0
- data/test/calendlyr/client_test.rb +11 -0
- data/test/calendlyr/object_test.rb +21 -0
- data/test/calendlyr/resource_test.rb +14 -0
- data/test/{calendly/resources/data_compliance.rb → calendlyr/resources/data_compliance_test.rb} +0 -0
- data/test/{calendly → calendlyr}/resources/event_invitees_test.rb +3 -3
- data/test/{calendly → calendlyr}/resources/event_types_test.rb +3 -3
- data/test/{calendly → calendlyr}/resources/events_test.rb +3 -3
- data/test/{calendly → calendlyr}/resources/organizations_test.rb +41 -26
- data/test/calendlyr/resources/scheduling_links_test.rb +15 -0
- data/test/{calendly → calendlyr}/resources/users_test.rb +24 -12
- data/test/{calendly → calendlyr}/resources/webhooks_test.rb +8 -5
- data/test/{calendly_test.rb → calendlyr_test.rb} +2 -2
- data/test/fixtures/organizations/invite.json +9 -7
- data/test/fixtures/organizations/list_invitations.json +1 -1
- data/test/fixtures/organizations/retrieve_invitation.json +1 -1
- data/test/fixtures/resources/400.json +10 -0
- data/test/fixtures/resources/401.json +10 -0
- data/test/fixtures/resources/403.json +10 -0
- data/test/fixtures/resources/404.json +10 -0
- data/test/fixtures/resources/409.json +4 -0
- data/test/fixtures/resources/500.json +10 -0
- data/test/fixtures/users/reload.json +14 -0
- data/test/test_helper.rb +9 -3
- metadata +67 -51
- data/lib/calendly/version.rb +0 -3
- data/lib/calendly.rb +0 -35
- data/test/calendly/client_test.rb +0 -8
- data/test/calendly/object_test.rb +0 -21
- data/test/calendly/resources/scheduling_links.rb +0 -12
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calendlyr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- araluce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -114,42 +114,43 @@ files:
|
|
114
114
|
- bin/console
|
115
115
|
- bin/setup
|
116
116
|
- bin/test
|
117
|
-
-
|
118
|
-
- lib/
|
119
|
-
- lib/
|
120
|
-
- lib/
|
121
|
-
- lib/
|
122
|
-
- lib/
|
123
|
-
- lib/
|
124
|
-
- lib/
|
125
|
-
- lib/
|
126
|
-
- lib/
|
127
|
-
- lib/
|
128
|
-
- lib/
|
129
|
-
- lib/
|
130
|
-
- lib/
|
131
|
-
- lib/
|
132
|
-
- lib/
|
133
|
-
- lib/
|
134
|
-
- lib/
|
135
|
-
- lib/
|
136
|
-
- lib/
|
137
|
-
- lib/
|
138
|
-
- lib/
|
139
|
-
- lib/
|
140
|
-
- lib/
|
141
|
-
- lib/
|
142
|
-
- test/
|
143
|
-
- test/
|
144
|
-
- test/
|
145
|
-
- test/
|
146
|
-
- test/
|
147
|
-
- test/
|
148
|
-
- test/
|
149
|
-
- test/
|
150
|
-
- test/
|
151
|
-
- test/
|
152
|
-
- test/
|
117
|
+
- calendlyr.gemspec
|
118
|
+
- lib/calendlyr.rb
|
119
|
+
- lib/calendlyr/client.rb
|
120
|
+
- lib/calendlyr/collection.rb
|
121
|
+
- lib/calendlyr/error.rb
|
122
|
+
- lib/calendlyr/object.rb
|
123
|
+
- lib/calendlyr/objects/event_invitees.rb
|
124
|
+
- lib/calendlyr/objects/event_types.rb
|
125
|
+
- lib/calendlyr/objects/events.rb
|
126
|
+
- lib/calendlyr/objects/invitations.rb
|
127
|
+
- lib/calendlyr/objects/memberships.rb
|
128
|
+
- lib/calendlyr/objects/organizations.rb
|
129
|
+
- lib/calendlyr/objects/scheduling_links.rb
|
130
|
+
- lib/calendlyr/objects/users.rb
|
131
|
+
- lib/calendlyr/objects/webhooks.rb
|
132
|
+
- lib/calendlyr/resource.rb
|
133
|
+
- lib/calendlyr/resources/data_compliance.rb
|
134
|
+
- lib/calendlyr/resources/event_invitees.rb
|
135
|
+
- lib/calendlyr/resources/event_types.rb
|
136
|
+
- lib/calendlyr/resources/events.rb
|
137
|
+
- lib/calendlyr/resources/organizations.rb
|
138
|
+
- lib/calendlyr/resources/scheduling_links.rb
|
139
|
+
- lib/calendlyr/resources/users.rb
|
140
|
+
- lib/calendlyr/resources/webhooks.rb
|
141
|
+
- lib/calendlyr/version.rb
|
142
|
+
- test/calendlyr/client_test.rb
|
143
|
+
- test/calendlyr/object_test.rb
|
144
|
+
- test/calendlyr/resource_test.rb
|
145
|
+
- test/calendlyr/resources/data_compliance_test.rb
|
146
|
+
- test/calendlyr/resources/event_invitees_test.rb
|
147
|
+
- test/calendlyr/resources/event_types_test.rb
|
148
|
+
- test/calendlyr/resources/events_test.rb
|
149
|
+
- test/calendlyr/resources/organizations_test.rb
|
150
|
+
- test/calendlyr/resources/scheduling_links_test.rb
|
151
|
+
- test/calendlyr/resources/users_test.rb
|
152
|
+
- test/calendlyr/resources/webhooks_test.rb
|
153
|
+
- test/calendlyr_test.rb
|
153
154
|
- test/fixtures/data_compliance/delete_invitee_data.json
|
154
155
|
- test/fixtures/event_invitees/list.json
|
155
156
|
- test/fixtures/event_invitees/retrieve.json
|
@@ -164,18 +165,25 @@ files:
|
|
164
165
|
- test/fixtures/organizations/retrieve_invitation.json
|
165
166
|
- test/fixtures/organizations/retrieve_membership.json
|
166
167
|
- test/fixtures/organizations/revoke_invitation.json
|
168
|
+
- test/fixtures/resources/400.json
|
169
|
+
- test/fixtures/resources/401.json
|
170
|
+
- test/fixtures/resources/403.json
|
171
|
+
- test/fixtures/resources/404.json
|
172
|
+
- test/fixtures/resources/409.json
|
173
|
+
- test/fixtures/resources/500.json
|
167
174
|
- test/fixtures/scheduling_links/create.json
|
175
|
+
- test/fixtures/users/reload.json
|
168
176
|
- test/fixtures/users/retrieve.json
|
169
177
|
- test/fixtures/webhooks/create.json
|
170
178
|
- test/fixtures/webhooks/delete.json
|
171
179
|
- test/fixtures/webhooks/list.json
|
172
180
|
- test/fixtures/webhooks/retrieve.json
|
173
181
|
- test/test_helper.rb
|
174
|
-
homepage: https://github.com/araluce/
|
182
|
+
homepage: https://github.com/araluce/calendlyr
|
175
183
|
licenses:
|
176
184
|
- MIT
|
177
185
|
metadata:
|
178
|
-
homepage_uri: https://github.com/araluce/
|
186
|
+
homepage_uri: https://github.com/araluce/calendlyr
|
179
187
|
post_install_message:
|
180
188
|
rdoc_options: []
|
181
189
|
require_paths:
|
@@ -196,17 +204,18 @@ signing_key:
|
|
196
204
|
specification_version: 4
|
197
205
|
summary: Ruby bindings for Calendly API.
|
198
206
|
test_files:
|
199
|
-
- test/
|
200
|
-
- test/
|
201
|
-
- test/
|
202
|
-
- test/
|
203
|
-
- test/
|
204
|
-
- test/
|
205
|
-
- test/
|
206
|
-
- test/
|
207
|
-
- test/
|
208
|
-
- test/
|
209
|
-
- test/
|
207
|
+
- test/calendlyr/client_test.rb
|
208
|
+
- test/calendlyr/object_test.rb
|
209
|
+
- test/calendlyr/resource_test.rb
|
210
|
+
- test/calendlyr/resources/data_compliance_test.rb
|
211
|
+
- test/calendlyr/resources/event_invitees_test.rb
|
212
|
+
- test/calendlyr/resources/event_types_test.rb
|
213
|
+
- test/calendlyr/resources/events_test.rb
|
214
|
+
- test/calendlyr/resources/organizations_test.rb
|
215
|
+
- test/calendlyr/resources/scheduling_links_test.rb
|
216
|
+
- test/calendlyr/resources/users_test.rb
|
217
|
+
- test/calendlyr/resources/webhooks_test.rb
|
218
|
+
- test/calendlyr_test.rb
|
210
219
|
- test/fixtures/data_compliance/delete_invitee_data.json
|
211
220
|
- test/fixtures/event_invitees/list.json
|
212
221
|
- test/fixtures/event_invitees/retrieve.json
|
@@ -221,7 +230,14 @@ test_files:
|
|
221
230
|
- test/fixtures/organizations/retrieve_invitation.json
|
222
231
|
- test/fixtures/organizations/retrieve_membership.json
|
223
232
|
- test/fixtures/organizations/revoke_invitation.json
|
233
|
+
- test/fixtures/resources/400.json
|
234
|
+
- test/fixtures/resources/401.json
|
235
|
+
- test/fixtures/resources/403.json
|
236
|
+
- test/fixtures/resources/404.json
|
237
|
+
- test/fixtures/resources/409.json
|
238
|
+
- test/fixtures/resources/500.json
|
224
239
|
- test/fixtures/scheduling_links/create.json
|
240
|
+
- test/fixtures/users/reload.json
|
225
241
|
- test/fixtures/users/retrieve.json
|
226
242
|
- test/fixtures/webhooks/create.json
|
227
243
|
- test/fixtures/webhooks/delete.json
|
data/lib/calendly/version.rb
DELETED
data/lib/calendly.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require "net/http"
|
2
|
-
require "uri"
|
3
|
-
require "json"
|
4
|
-
require "openssl"
|
5
|
-
require "cgi"
|
6
|
-
require "calendly/version"
|
7
|
-
|
8
|
-
module Calendly
|
9
|
-
autoload :Client, "calendly/client"
|
10
|
-
autoload :Collection, "calendly/collection"
|
11
|
-
autoload :Error, "calendly/error"
|
12
|
-
autoload :Resource, "calendly/resource"
|
13
|
-
autoload :Object, "calendly/object"
|
14
|
-
|
15
|
-
# High-level categories of Calendly API calls
|
16
|
-
autoload :UserResource, "calendly/resources/users"
|
17
|
-
autoload :EventTypeResource, "calendly/resources/event_types"
|
18
|
-
autoload :OrganizationResource, "calendly/resources/organizations"
|
19
|
-
autoload :EventResource, "calendly/resources/events"
|
20
|
-
autoload :EventInviteeResource, "calendly/resources/event_invitees"
|
21
|
-
autoload :SchedulingLinkResource, "calendly/resources/scheduling_links"
|
22
|
-
autoload :WebhookResource, "calendly/resources/webhooks"
|
23
|
-
autoload :DataComplianceResource, "calendly/resources/data_compliance"
|
24
|
-
|
25
|
-
# Classes used to return a nicer object wrapping the response data
|
26
|
-
autoload :User, "calendly/objects/users"
|
27
|
-
autoload :EventType, "calendly/objects/event_types"
|
28
|
-
autoload :Event, "calendly/objects/events"
|
29
|
-
autoload :Organization, "calendly/objects/organizations"
|
30
|
-
autoload :Invitation, "calendly/objects/invitations"
|
31
|
-
autoload :EventInvitee, "calendly/objects/event_invitees"
|
32
|
-
autoload :SchedulingLink, "calendly/objects/scheduling_links"
|
33
|
-
autoload :Membership, "calendly/objects/memberships"
|
34
|
-
autoload :Webhook, "calendly/objects/webhooks"
|
35
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
|
3
|
-
class ObjectTest < Minitest::Test
|
4
|
-
def test_creating_object_from_hash
|
5
|
-
assert_equal "bar", Calendly::Object.new(foo: "bar").foo
|
6
|
-
end
|
7
|
-
|
8
|
-
def test_nested_hash
|
9
|
-
assert_equal "foobar", Calendly::Object.new(foo: {bar: {baz: "foobar"}}, client: nil).foo.bar.baz
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_nested_number
|
13
|
-
assert_equal 1, Calendly::Object.new(foo: {bar: 1}, client: nil).foo.bar
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_array
|
17
|
-
object = Calendly::Object.new(foo: [{bar: :baz}], client: nil)
|
18
|
-
assert_equal OpenStruct, object.foo.first.class
|
19
|
-
assert_equal :baz, object.foo.first.bar
|
20
|
-
end
|
21
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "test_helper"
|
4
|
-
|
5
|
-
class SchedulingLinksResourceTest < Minitest::Test
|
6
|
-
def test_create
|
7
|
-
body = {owner_uri: "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2", max_event_count: 20, owner_type: "EventType"}
|
8
|
-
stub(method: :post, path: "scheduling_links", body: body, response: {body: fixture_file("scheduling_links/create"), status: 201})
|
9
|
-
|
10
|
-
assert client.data_compliance.delete_invitee_data(**body)
|
11
|
-
end
|
12
|
-
end
|