calendlyr 0.3.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/CHANGELOG.md +3 -27
  4. data/Gemfile +1 -5
  5. data/README.md +47 -20
  6. data/bin/console +3 -3
  7. data/{calendly.gemspec → calendlyr.gemspec} +3 -3
  8. data/lib/{calendly → calendlyr}/client.rb +9 -9
  9. data/lib/{calendly → calendlyr}/collection.rb +4 -1
  10. data/lib/{calendly → calendlyr}/error.rb +1 -1
  11. data/lib/{calendly → calendlyr}/object.rb +1 -1
  12. data/lib/{calendly → calendlyr}/objects/event_invitees.rb +1 -1
  13. data/lib/{calendly → calendlyr}/objects/event_types.rb +1 -1
  14. data/lib/{calendly → calendlyr}/objects/events.rb +1 -1
  15. data/lib/{calendly → calendlyr}/objects/invitations.rb +1 -1
  16. data/lib/{calendly → calendlyr}/objects/memberships.rb +1 -1
  17. data/lib/{calendly → calendlyr}/objects/organizations.rb +9 -1
  18. data/lib/{calendly → calendlyr}/objects/scheduling_links.rb +1 -1
  19. data/lib/{calendly → calendlyr}/objects/users.rb +1 -1
  20. data/lib/{calendly → calendlyr}/objects/webhooks.rb +1 -1
  21. data/lib/{calendly → calendlyr}/resource.rb +13 -25
  22. data/lib/{calendly → calendlyr}/resources/data_compliance.rb +1 -1
  23. data/lib/{calendly → calendlyr}/resources/event_invitees.rb +1 -1
  24. data/lib/{calendly → calendlyr}/resources/event_types.rb +1 -1
  25. data/lib/{calendly → calendlyr}/resources/events.rb +1 -1
  26. data/lib/{calendly → calendlyr}/resources/organizations.rb +2 -2
  27. data/lib/{calendly → calendlyr}/resources/scheduling_links.rb +1 -1
  28. data/lib/{calendly → calendlyr}/resources/users.rb +1 -1
  29. data/lib/{calendly → calendlyr}/resources/webhooks.rb +1 -1
  30. data/lib/calendlyr/version.rb +3 -0
  31. data/lib/calendlyr.rb +30 -0
  32. data/test/calendlyr/client_test.rb +11 -0
  33. data/test/calendlyr/object_test.rb +21 -0
  34. data/test/calendlyr/resource_test.rb +14 -0
  35. data/test/{calendly/resources/data_compliance.rb → calendlyr/resources/data_compliance_test.rb} +0 -0
  36. data/test/{calendly → calendlyr}/resources/event_invitees_test.rb +3 -3
  37. data/test/{calendly → calendlyr}/resources/event_types_test.rb +3 -3
  38. data/test/{calendly → calendlyr}/resources/events_test.rb +3 -3
  39. data/test/{calendly → calendlyr}/resources/organizations_test.rb +41 -26
  40. data/test/calendlyr/resources/scheduling_links_test.rb +15 -0
  41. data/test/{calendly → calendlyr}/resources/users_test.rb +24 -12
  42. data/test/{calendly → calendlyr}/resources/webhooks_test.rb +8 -5
  43. data/test/{calendly_test.rb → calendlyr_test.rb} +2 -2
  44. data/test/fixtures/organizations/invite.json +9 -7
  45. data/test/fixtures/organizations/list_invitations.json +1 -1
  46. data/test/fixtures/organizations/retrieve_invitation.json +1 -1
  47. data/test/fixtures/resources/400.json +10 -0
  48. data/test/fixtures/resources/401.json +10 -0
  49. data/test/fixtures/resources/403.json +10 -0
  50. data/test/fixtures/resources/404.json +10 -0
  51. data/test/fixtures/resources/409.json +4 -0
  52. data/test/fixtures/resources/500.json +10 -0
  53. data/test/fixtures/users/reload.json +14 -0
  54. data/test/test_helper.rb +9 -3
  55. metadata +67 -51
  56. data/lib/calendly/version.rb +0 -3
  57. data/lib/calendly.rb +0 -35
  58. data/test/calendly/client_test.rb +0 -8
  59. data/test/calendly/object_test.rb +0 -21
  60. 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.3.3
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-09-23 00:00:00.000000000 Z
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
- - calendly.gemspec
118
- - lib/calendly.rb
119
- - lib/calendly/client.rb
120
- - lib/calendly/collection.rb
121
- - lib/calendly/error.rb
122
- - lib/calendly/object.rb
123
- - lib/calendly/objects/event_invitees.rb
124
- - lib/calendly/objects/event_types.rb
125
- - lib/calendly/objects/events.rb
126
- - lib/calendly/objects/invitations.rb
127
- - lib/calendly/objects/memberships.rb
128
- - lib/calendly/objects/organizations.rb
129
- - lib/calendly/objects/scheduling_links.rb
130
- - lib/calendly/objects/users.rb
131
- - lib/calendly/objects/webhooks.rb
132
- - lib/calendly/resource.rb
133
- - lib/calendly/resources/data_compliance.rb
134
- - lib/calendly/resources/event_invitees.rb
135
- - lib/calendly/resources/event_types.rb
136
- - lib/calendly/resources/events.rb
137
- - lib/calendly/resources/organizations.rb
138
- - lib/calendly/resources/scheduling_links.rb
139
- - lib/calendly/resources/users.rb
140
- - lib/calendly/resources/webhooks.rb
141
- - lib/calendly/version.rb
142
- - test/calendly/client_test.rb
143
- - test/calendly/object_test.rb
144
- - test/calendly/resources/data_compliance.rb
145
- - test/calendly/resources/event_invitees_test.rb
146
- - test/calendly/resources/event_types_test.rb
147
- - test/calendly/resources/events_test.rb
148
- - test/calendly/resources/organizations_test.rb
149
- - test/calendly/resources/scheduling_links.rb
150
- - test/calendly/resources/users_test.rb
151
- - test/calendly/resources/webhooks_test.rb
152
- - test/calendly_test.rb
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/calendly.rb
182
+ homepage: https://github.com/araluce/calendlyr
175
183
  licenses:
176
184
  - MIT
177
185
  metadata:
178
- homepage_uri: https://github.com/araluce/calendly.rb
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/calendly/client_test.rb
200
- - test/calendly/object_test.rb
201
- - test/calendly/resources/data_compliance.rb
202
- - test/calendly/resources/event_invitees_test.rb
203
- - test/calendly/resources/event_types_test.rb
204
- - test/calendly/resources/events_test.rb
205
- - test/calendly/resources/organizations_test.rb
206
- - test/calendly/resources/scheduling_links.rb
207
- - test/calendly/resources/users_test.rb
208
- - test/calendly/resources/webhooks_test.rb
209
- - test/calendly_test.rb
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
@@ -1,3 +0,0 @@
1
- module Calendly
2
- VERSION = "0.3.3"
3
- end
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,8 +0,0 @@
1
- require "test_helper"
2
-
3
- class ClientTest < Minitest::Test
4
- def test_api_key
5
- client = Calendly::Client.new api_key: "test"
6
- assert_equal "test", client.api_key
7
- end
8
- 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