calendlyr 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +7 -8
  3. data/CHANGELOG.md +2 -2
  4. data/README.md +46 -127
  5. data/calendlyr.gemspec +0 -1
  6. data/docs/resources/activity_log/list_activity_log_entries.md +34 -0
  7. data/docs/resources/availabilities/availability_rule.md +5 -0
  8. data/docs/resources/availabilities/user_availability_schedule.md +50 -0
  9. data/docs/resources/availabilities/user_busy_time.md +28 -0
  10. data/docs/resources/data_compliance.md +19 -0
  11. data/docs/resources/event_types/available_time.md +21 -0
  12. data/docs/resources/event_types/event_type.md +55 -0
  13. data/docs/resources/event_types/membership.md +29 -0
  14. data/docs/resources/event_types/profile.md +13 -0
  15. data/docs/resources/events/cancellation.md +18 -0
  16. data/docs/resources/events/event.md +62 -0
  17. data/docs/resources/events/guest.md +5 -0
  18. data/docs/resources/events/invitee.md +28 -0
  19. data/docs/resources/events/invitee_no_show.md +49 -0
  20. data/docs/resources/groups/group.md +56 -0
  21. data/docs/resources/groups/relationship.md +54 -0
  22. data/docs/resources/organizations/invitation.md +65 -0
  23. data/docs/resources/organizations/membership.md +58 -0
  24. data/docs/resources/organizations/organization.md +149 -0
  25. data/docs/resources/pagination.md +21 -0
  26. data/docs/resources/routing_forms/routing_form.md +48 -0
  27. data/docs/resources/routing_forms/submission.md +40 -0
  28. data/docs/resources/scheduling_link.md +26 -0
  29. data/docs/resources/share.md +28 -0
  30. data/docs/resources/user.md +111 -0
  31. data/docs/resources/webhooks/invitee_payload.md +42 -0
  32. data/docs/resources/webhooks/payload.md +5 -0
  33. data/docs/resources/webhooks/subscription.md +96 -0
  34. data/lib/calendlyr/client.rb +18 -2
  35. data/lib/calendlyr/collection.rb +2 -2
  36. data/lib/calendlyr/error.rb +42 -1
  37. data/lib/calendlyr/object.rb +6 -2
  38. data/lib/calendlyr/objects/activity_log.rb +11 -0
  39. data/lib/calendlyr/objects/availabilities/rule.rb +4 -0
  40. data/lib/calendlyr/objects/availabilities/user_busy_time.rb +7 -0
  41. data/lib/calendlyr/objects/availabilities/user_schedule.rb +13 -0
  42. data/lib/calendlyr/objects/event.rb +11 -0
  43. data/lib/calendlyr/objects/event_type.rb +15 -0
  44. data/lib/calendlyr/objects/event_types/available_time.rb +4 -0
  45. data/lib/calendlyr/objects/event_types/membership.rb +11 -0
  46. data/lib/calendlyr/objects/event_types/profile.rb +7 -0
  47. data/lib/calendlyr/objects/events/cancellation.rb +4 -0
  48. data/lib/calendlyr/objects/events/guest.rb +4 -0
  49. data/lib/calendlyr/objects/events/invitee.rb +11 -0
  50. data/lib/calendlyr/objects/events/invitee_no_show.rb +7 -0
  51. data/lib/calendlyr/objects/group.rb +15 -0
  52. data/lib/calendlyr/objects/groups/relationship.rb +15 -0
  53. data/lib/calendlyr/objects/organization.rb +67 -0
  54. data/lib/calendlyr/objects/organizations/invitation.rb +15 -0
  55. data/lib/calendlyr/objects/organizations/membership.rb +15 -0
  56. data/lib/calendlyr/objects/routing_form.rb +11 -0
  57. data/lib/calendlyr/objects/routing_forms/submission.rb +7 -0
  58. data/lib/calendlyr/objects/scheduling_link.rb +9 -0
  59. data/lib/calendlyr/objects/share.rb +9 -0
  60. data/lib/calendlyr/objects/user.rb +31 -0
  61. data/lib/calendlyr/objects/webhooks/invitee_payload.rb +15 -0
  62. data/lib/calendlyr/objects/webhooks/payload.rb +4 -0
  63. data/lib/calendlyr/objects/webhooks/subscription.rb +23 -0
  64. data/lib/calendlyr/resource.rb +2 -2
  65. data/lib/calendlyr/resources/availability.rb +19 -0
  66. data/lib/calendlyr/resources/data_compliance.rb +4 -0
  67. data/lib/calendlyr/resources/event.rb +40 -0
  68. data/lib/calendlyr/resources/event_type.rb +28 -0
  69. data/lib/calendlyr/resources/group.rb +22 -0
  70. data/lib/calendlyr/resources/organization.rb +40 -0
  71. data/lib/calendlyr/resources/outgoing_communication.rb +8 -0
  72. data/lib/calendlyr/resources/routing_form.rb +22 -0
  73. data/lib/calendlyr/resources/{scheduling_links.rb → scheduling_link.rb} +2 -2
  74. data/lib/calendlyr/resources/share.rb +8 -0
  75. data/lib/calendlyr/resources/user.rb +11 -0
  76. data/lib/calendlyr/resources/webhook.rb +25 -0
  77. data/lib/calendlyr/version.rb +1 -1
  78. data/lib/calendlyr.rb +70 -18
  79. data/test/calendlyr/objects/activity_log_test.rb +26 -0
  80. data/test/calendlyr/objects/availabilities/rule_test.rb +24 -0
  81. data/test/calendlyr/objects/availabilities/user_busy_time_test.rb +21 -0
  82. data/test/calendlyr/objects/availabilities/user_schedule_test.rb +26 -0
  83. data/test/calendlyr/objects/event_test.rb +32 -0
  84. data/test/calendlyr/objects/event_type_test.rb +43 -0
  85. data/test/calendlyr/objects/event_types/available_time_test.rb +20 -0
  86. data/test/calendlyr/objects/event_types/membership_test.rb +32 -0
  87. data/test/calendlyr/objects/event_types/profile_test.rb +23 -0
  88. data/test/calendlyr/objects/events/cancellation_test.rb +16 -0
  89. data/test/calendlyr/objects/events/guest_test.rb +16 -0
  90. data/test/calendlyr/objects/events/invitee_no_show_test.rb +23 -0
  91. data/test/calendlyr/objects/events/invitee_test.rb +35 -0
  92. data/test/calendlyr/objects/group_test.rb +40 -0
  93. data/test/calendlyr/objects/groups/relationship_test.rb +43 -0
  94. data/test/calendlyr/objects/organization_test.rb +157 -0
  95. data/test/calendlyr/objects/organizations/invitation_test.rb +34 -0
  96. data/test/calendlyr/objects/organizations/membership_test.rb +38 -0
  97. data/test/calendlyr/objects/routing_form_test.rb +26 -0
  98. data/test/calendlyr/objects/routing_forms/submission_test.rb +22 -0
  99. data/test/calendlyr/objects/scheduling_link_test.rb +17 -0
  100. data/test/calendlyr/objects/share_test.rb +19 -0
  101. data/test/calendlyr/objects/user_test.rb +81 -0
  102. data/test/calendlyr/objects/webhooks/invite_payload_test.rb +42 -0
  103. data/test/calendlyr/objects/webhooks/payload_test.rb +16 -0
  104. data/test/calendlyr/objects/webhooks/subscription_test.rb +42 -0
  105. data/test/calendlyr/resource_test.rb +12 -3
  106. data/test/calendlyr/resources/availabilities/user_busy_times_test.rb +31 -0
  107. data/test/calendlyr/resources/availabilities/user_schedules_test.rb +37 -0
  108. data/test/calendlyr/resources/data_compliance_test.rb +11 -0
  109. data/test/calendlyr/resources/event_types/membership_test.rb +22 -0
  110. data/test/calendlyr/resources/event_types_test.rb +55 -10
  111. data/test/calendlyr/resources/events/invitee_test.rb +31 -0
  112. data/test/calendlyr/resources/events_test.rb +22 -10
  113. data/test/calendlyr/resources/groups_test.rb +26 -0
  114. data/test/calendlyr/resources/organizations_test.rb +36 -100
  115. data/test/calendlyr/resources/outgoing_communications_test.rb +16 -0
  116. data/test/calendlyr/resources/scheduling_links_test.rb +1 -1
  117. data/test/calendlyr/resources/users_test.rb +9 -33
  118. data/test/calendlyr/resources/webhooks_test.rb +22 -13
  119. data/test/fixtures/activity_log/list.json +38 -0
  120. data/test/fixtures/availabilities/user_busy_times_list.json +39 -0
  121. data/test/fixtures/availabilities/user_schedules_list.json +93 -0
  122. data/test/fixtures/availabilities/user_schedules_retrieve.json +22 -0
  123. data/test/fixtures/data_compliance/delete_scheduled_event_data.json +1 -0
  124. data/test/fixtures/event_invitees/list.json +6 -6
  125. data/test/fixtures/event_invitees/retrieve.json +3 -3
  126. data/test/fixtures/event_type_available_times/list.json +22 -0
  127. data/test/fixtures/event_type_hosts/list.json +76 -0
  128. data/test/fixtures/event_types/create_one_off.json +45 -0
  129. data/test/fixtures/event_types/list.json +18 -4
  130. data/test/fixtures/event_types/retrieve.json +13 -2
  131. data/test/fixtures/events/cancel_invitee.json +8 -0
  132. data/test/fixtures/events/create_invitee_no_show.json +7 -0
  133. data/test/fixtures/events/delete_invitee_no_show.json +1 -0
  134. data/test/fixtures/events/retrieve_invitee_no_show.json +7 -0
  135. data/test/fixtures/group_relationships/list.json +83 -0
  136. data/test/fixtures/group_relationships/retrieve.json +29 -0
  137. data/test/fixtures/groups/list.json +19 -0
  138. data/test/fixtures/groups/retrieve.json +9 -0
  139. data/test/fixtures/objects/activity_log.json +24 -0
  140. data/test/fixtures/objects/availabilities/rule.json +10 -0
  141. data/test/fixtures/objects/availabilities/user_busy_time.json +10 -0
  142. data/test/fixtures/objects/availabilities/user_schedule.json +69 -0
  143. data/test/fixtures/objects/availability_rule.json +10 -0
  144. data/test/fixtures/objects/event.json +36 -0
  145. data/test/fixtures/objects/event_type.json +91 -0
  146. data/test/fixtures/objects/event_type_host.json +65 -0
  147. data/test/fixtures/objects/event_types/available_time.json +6 -0
  148. data/test/fixtures/objects/event_types/membership.json +65 -0
  149. data/test/fixtures/objects/event_types/profile.json +5 -0
  150. data/test/fixtures/objects/events/cancellation.json +6 -0
  151. data/test/fixtures/objects/events/guest.json +5 -0
  152. data/test/fixtures/objects/events/invitee.json +46 -0
  153. data/test/fixtures/objects/events/invitee_no_show.json +5 -0
  154. data/test/fixtures/objects/group.json +7 -0
  155. data/test/fixtures/objects/groups/relationship.json +27 -0
  156. data/test/fixtures/objects/organization.json +8 -0
  157. data/test/fixtures/objects/organizations/invitation.json +10 -0
  158. data/test/fixtures/objects/organizations/membership.json +18 -0
  159. data/test/fixtures/objects/routing_form.json +28 -0
  160. data/test/fixtures/objects/routing_forms/submission.json +27 -0
  161. data/test/fixtures/objects/scheduling_links/event_type.json +5 -0
  162. data/test/fixtures/objects/share.json +43 -0
  163. data/test/fixtures/objects/user.json +13 -0
  164. data/test/fixtures/objects/webhooks/invite_payload.json +83 -0
  165. data/test/fixtures/objects/webhooks/payload.json +66 -0
  166. data/test/fixtures/objects/webhooks/subscription.json +15 -0
  167. data/test/fixtures/organization_memberships/list.json +29 -0
  168. data/test/fixtures/organization_memberships/retrieve.json +20 -0
  169. data/test/fixtures/organizations/list_invitations.json +4 -4
  170. data/test/fixtures/organizations/list_memberships.json +12 -9
  171. data/test/fixtures/organizations/retrieve_invitation.json +3 -3
  172. data/test/fixtures/organizations/retrieve_membership.json +3 -3
  173. data/test/fixtures/outgoing_communications/list.json +26 -0
  174. data/test/fixtures/resources/401.json +2 -2
  175. data/test/fixtures/resources/403.json +1 -1
  176. data/test/fixtures/resources/403_payment_required.json +4 -0
  177. data/test/fixtures/resources/424.json +4 -0
  178. data/test/fixtures/routing_forms/list.json +39 -0
  179. data/test/fixtures/routing_forms/list_routing_form_submission.json +38 -0
  180. data/test/fixtures/routing_forms/retrieve.json +30 -0
  181. data/test/fixtures/routing_forms/retrieve_routing_form_submission.json +29 -0
  182. data/test/fixtures/shares/create.json +45 -0
  183. data/test/fixtures/user_availability_schedules/list.json +93 -0
  184. data/test/fixtures/user_availability_schedules/retrieve.json +22 -0
  185. data/test/fixtures/user_busy_times/list.json +39 -0
  186. data/test/fixtures/users/reload.json +5 -4
  187. data/test/fixtures/users/retrieve.json +5 -4
  188. data/test/fixtures/webhooks/create.json +4 -4
  189. data/test/fixtures/webhooks/list.json +4 -4
  190. data/test/fixtures/webhooks/retrieve.json +4 -4
  191. data/test/fixtures/webhooks/sample.json +105 -0
  192. metadata +159 -62
  193. data/lib/calendlyr/objects/event_invitees.rb +0 -4
  194. data/lib/calendlyr/objects/event_types.rb +0 -4
  195. data/lib/calendlyr/objects/events.rb +0 -4
  196. data/lib/calendlyr/objects/invitations.rb +0 -11
  197. data/lib/calendlyr/objects/memberships.rb +0 -7
  198. data/lib/calendlyr/objects/organizations.rb +0 -35
  199. data/lib/calendlyr/objects/scheduling_links.rb +0 -4
  200. data/lib/calendlyr/objects/users.rb +0 -19
  201. data/lib/calendlyr/objects/webhooks.rb +0 -11
  202. data/lib/calendlyr/resources/event_invitees.rb +0 -12
  203. data/lib/calendlyr/resources/event_types.rb +0 -12
  204. data/lib/calendlyr/resources/events.rb +0 -12
  205. data/lib/calendlyr/resources/organizations.rb +0 -33
  206. data/lib/calendlyr/resources/users.rb +0 -11
  207. data/lib/calendlyr/resources/webhooks.rb +0 -21
  208. data/test/calendlyr/resources/event_invitees_test.rb +0 -29
  209. data/test/fixtures/resources/409.json +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dba013e04be70a3fdefdae9d2457b5f14b22d8cfd253b6b9247237b1a33aec6
4
- data.tar.gz: 9900aa135496d99c7e6e1a13071e2b7366153f9d47db00d5265ac96b61a029dc
3
+ metadata.gz: 0772a7b82da14fecdc3976b9cbc2a18cec54ca9e3eb2aaeedfc1df6e220d8cde
4
+ data.tar.gz: 985654c6b08521739aeb8b027c17c7094a1c4e49b1e3dbb291f52747f7e261b5
5
5
  SHA512:
6
- metadata.gz: 165450520bdd93a7e6f30566035db95ff2bd99b764bd86c1ea44e52e90cdf398636791e49f7829dbbd238ef966cf6e09562f4b2fed0149985152cc11cc81b13b
7
- data.tar.gz: 3885225e6feaea75a074f868ae3ad321c33a4c6413455ee9c10a16ba186e7144972391a20a125804f623ba9de92d69164560701fed6815e9fea9d9b1ce8f7f7c
6
+ metadata.gz: 92c7369f875233d12ccd063c47ce26c0be52f7443339aa73eccc648a69825ad27469a5ada5008c52f82ea504f98305b153705b0189f8da66e36fa6bf4354a364
7
+ data.tar.gz: d6b41ea040f57e158e12ca3a83d63fc60d5aadce62d577e17830e1fb5c82a7d8aad6995a8dbcbf04a62a0078a7356e850e26bce23afacea9d379c221e1b69fb2
@@ -1,21 +1,20 @@
1
1
  name: Tests
2
2
 
3
3
  on:
4
- pull_request:
5
- branches:
6
- - "*"
7
4
  push:
8
- branches:
9
- - master
5
+ branches: [master]
6
+ pull_request:
7
+ branches: "*"
8
+
10
9
  jobs:
11
10
  tests:
12
11
  runs-on: ubuntu-latest
13
12
  strategy:
14
13
  matrix:
15
- ruby: ["2.5", "2.6", "2.7", "3.0"]
14
+ ruby: ["2.5", "2.6", "2.7", "3.0", "3.2"]
16
15
 
17
16
  steps:
18
- - uses: actions/checkout@master
17
+ - uses: actions/checkout@v4
19
18
 
20
19
  - name: Set up Ruby
21
20
  uses: ruby/setup-ruby@v1
@@ -31,4 +30,4 @@ jobs:
31
30
  run: |
32
31
  bundle exec rake test
33
32
  env:
34
- CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
33
+ CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.6.0]
5
+ ## [0.7.0]
6
6
  * First real usable release :tada:
7
7
 
8
- [0.6.0]: https://github.com/araluce/calendlyr/compare/v0.1.0...v0.6.0
8
+ [0.7.0]: https://github.com/araluce/calendlyr/compare/v0.1.0...v0.7.0
data/README.md CHANGED
@@ -1,28 +1,29 @@
1
1
  [![](https://img.shields.io/github/license/araluce/calendlyr)](https://github.com/araluce/calendlyr/blob/master/LICENSE.txt)
2
2
  [![](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg)](https://github.com/araluce/calendlyr/actions)
3
3
  [![codecov](https://codecov.io/gh/araluce/calendlyr/branch/master/graph/badge.svg?token=YSUU4PHM6Y)](https://codecov.io/gh/araluce/calendlyr)
4
+ ![example workflow](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg)
4
5
  [![Gem Version](https://badge.fury.io/rb/calendlyr.svg)](https://badge.fury.io/rb/calendlyr)
5
6
 
6
- # Calendly API Rubygem LITE version
7
+ # Calendly API Rubygem
7
8
 
8
9
  Easy and complete rubygem for [Calendly](https://calendly.com/). Currently supports [API v2](https://calendly.stoplight.io/docs/api-docs).
9
10
 
10
11
  Just needed a Personal Access Token.
11
12
 
12
- > If you need a Oauth authentication maybe you need [calendly-api-ruby-client](https://github.com/koshilife/calendly-api-ruby-client)
13
-
14
13
  ## Dependencies
15
14
 
16
15
  No dependencies :tada:
17
16
 
18
17
  We know about the importance of not add dependencies that you don't want.
19
18
 
20
- ## Installation
19
+ ## 📚 Docs
20
+
21
+ ### Installation
21
22
 
22
23
  Add this line to your application's Gemfile:
23
24
 
24
25
  ```ruby
25
- gem 'calendlyr'
26
+ gem 'calendlyr', '0.7.0'
26
27
  ```
27
28
 
28
29
  And then execute:
@@ -33,7 +34,7 @@ Or install it yourself as:
33
34
 
34
35
  $ gem install calendlyr
35
36
 
36
- ## Usage
37
+ ### Usage
37
38
 
38
39
  To access the API, you'll need to create a `Calendlyr::Client` and pass in your token. You can generate your Personal Access Token at [https://calendly.com/integrations/api_webhooks](https://calendly.com/integrations/api_webhooks)
39
40
 
@@ -43,131 +44,49 @@ client = Calendlyr::Client.new(token: ENV["CALENDLY_TOKEN"])
43
44
 
44
45
  The client then gives you access to each of the resources.
45
46
 
46
- ## Resources
47
+
48
+ ### Resources
47
49
 
48
50
  The gem maps as closely as we can to the Calendly API so you can easily convert API examples to gem code.
49
51
 
50
52
  Responses are created as objects like `Calendlyr::Event`. Having types like `Calendlyr::User` is handy for understanding what type of object you're working with. They're built using OpenStruct so you can easily access data in a Ruby-ish way.
51
53
 
52
- ##### Pagination
53
-
54
- `collection` endpoints return pages of results. The result object will have a `data` key to access the results, as well as pagination like `next_page` for retrieving the next pages. You may also specify the
55
-
56
- ```ruby
57
- results = client.me.events(count: 5)
58
- #=> Calendlyr::Collection
59
-
60
- results.count
61
- #=> 5
62
-
63
- results.data
64
- #=> [#<Calendlyr::Event>, #<Calendlyr::Event>]
65
-
66
- results.next_page_token
67
- #=> "KfKBetd7bS0wsFINjYky9mp8ZJXv76aL"
68
-
69
- # Retrieve the next page
70
- client.me.events(count: 5, next_page_token: results.next_page_token)
71
- #=> Calendlyr::Collection
72
- ```
73
-
74
- ### Users
75
- ```ruby
76
- client.me
77
- client.users.me
78
- client.retrieve(user_uuid: "uuid")
79
-
80
- client.organization
81
- #=> #<Calendlyr::Organization>
82
-
83
- client.me.event_types
84
- #=> Calendlyr::Collection @data=[#<Calendlyr::EventType>, #<Calendlyr::EventType>]
85
-
86
- client.me.events
87
- #=> Calendlyr::Collection @data=[#<Calendlyr::Event>, #<Calendlyr::Event>]
88
-
89
- client.me.memberships
90
- #=> Calendlyr::Collection @data=[#<Calendlyr::MemberShip>, #<Calendlyr::MemberShip>]
91
- ```
92
-
93
- #### Me (Cached)
94
-
95
- Probably you need to make many calls through `client.me`, so we decided to not make calls for every `client.me` reference by caching it the first time. However, if you need to reload the content of `me` you can `force_relaod` to force a new call.
96
-
97
- ```ruby
98
- client.me # makes a call and caches the response
99
- client.me # no call, value cached
100
- client.me(force_reload: true) # makes a new call and update cache value
101
- ```
102
-
103
-
104
- ### Event Types
105
- ````ruby
106
- client.event_types.list user_uri: "user_uri", organization_uri: "organization_uri"
107
- client.event_types.retrieve event_type_uuid: "id"
108
- ````
109
-
110
- ### Events
111
- ````ruby
112
- client.events.list user_uri: "user_uri", organization_uri: "organization_uri"
113
- client.events.retrieve event_uuid: "event_uuid"
114
- ````
115
-
116
- ### Event Invitees
117
- ````ruby
118
- client.event_invitees.list event_uuid: "event_uuid"
119
- client.event_invitees.retrieve event_uuid: "event_uuid", invitee_uuid: "invitee_uuid"
120
- ````
121
-
122
- ### Scheduling Links
123
- ````ruby
124
- client.scheduling_links.create owner_uri: "owner_uri", max_event_count: 1, owner_type: "EventType"
125
- ````
126
-
127
- ### Organizations
128
- ````ruby
129
- # Create invitation
130
- client.organizations.invite(organization_uuid: "organization_uuid", email: "test@test.com")
131
- client.organization.invite(email: "test@test.com")
132
- # List invitations
133
- client.organizations.list_invitations(organization_uuid: "organization_uuid")
134
- client.organization.list_invitations
135
- # Get invitation
136
- client.organizations.retrieve_invitation(organization_uuid: "organization_uuid", invitation_uuid: "invitation_uuid")
137
- client.organization.invitation(invitation_uuid: "invitation_uuid")
138
- # Revoke invitation
139
- client.organizations.revoke_invitation(organization_uuid: "organization_uuid", invitation_uuid: "organization_uuid")
140
- client.organization.revoke_invitation(invitation_uuid: "organization_uuid")
141
- invitation = client.organization.invitation(invitation_uuid: "invitation_uuid")
142
- invitation.revoke
143
-
144
- # List memberships
145
- client.organizations.list_memberships
146
- client.organization.memberships
147
- # Get membership
148
- client.organizations.retrieve_membership(membership_uuid: "membership_uuid")
149
- # Remove membership
150
- client.organizations.remove_user(membership_uuid: "membership_uuid")
151
-
152
- client.organization.events
153
-
154
- # List/Creaete webhooks
155
- client.organization.list_webhooks(scope: "scope")
156
- client.organization.create_webhook(url: "post_callback_url", events: ["invitee.canceled", "invitee.created"], scope: "scope")
157
- ````
158
-
159
- ### Webhooks
160
- ```ruby
161
- client.webhooks.list(organization_uri: "organization_uri", scope: "scope")
162
- client.webhooks.create(url: "post_callback_url", events: ["invitee.canceled", "invitee.created"], organization_uri: "organization_uri", scope: "scope")
163
- client.webhooks.retrieve(webhook_uuid: "webhook_uuid")
164
- client.webhooks.delete(webhook_uuid: "webhook_uuid")
165
- ```
166
-
167
- ### Data Compliance
168
- ```ruby
169
- client.data_compliance.delete_invitee_data
170
- ```
54
+ * [Pagination](docs/resources/pagination.md)
55
+ * **Activity Log**
56
+ * [Calendlyr::ActivityLog](docs/resources/activity_log/list_activity_log_entries.md)
57
+ * **Availabilities**
58
+ * [Calendlyr::Availabilities::Rule](docs/resources/availabilities/availability_rule.md)
59
+ * [Calendlyr::Availabilities::UserSchedule](docs/resources/availabilities/user_availability_schedule.md)
60
+ * [Calendlyr::Availabilities::UserBusyTime](docs/resources/availabilities/user_busy_time.md)
61
+ * [Data Compliance](docs/resources/data_compliance.md)
62
+ * **Event Types**
63
+ * [Calendlyr::EventType](docs/resources/event_types/event_type.md)
64
+ * [Calendlyr::EventTypes::AvailableTime](docs/resources/event_types/available_time.md)
65
+ * [Calendlyr::EventTypes::Membership](docs/resources/event_types/membership.md)
66
+ * [Calendlyr::EventTypes::Profile](docs/resources/event_types/profile.md)
67
+ * **Groups**
68
+ * [Calendlyr::Group](docs/resources/groups/group.md)
69
+ * [Calendlyr::Groups::Relationship](docs/resources/groups/relationship.md)
70
+ * **Organizations**
71
+ * [Calendlyr::Organization](docs/resources/organizations/organization.md)
72
+ * [Calendlyr::Organizations::Invitation](docs/resources/organizations/invitation.md)
73
+ * [Calendlyr::Organizations::Membership](docs/resources/organizations/membership.md)
74
+ * **Routing Forms**
75
+ * [Calendlyr::RoutingForm](docs/resources/routing_forms/routing_form.md)
76
+ * [Calendlyr::RoutingForms::Submission](docs/resources/routing_forms/submission.md)
77
+ * **Schedule Events**
78
+ * [Calendlyr::Event](docs/resources/events/event.md)
79
+ * [Calendlyr::Events::Cancellation](docs/resources/events/cancellation.md)
80
+ * [Calendlyr::Events::Guest](docs/resources/events/guest.md)
81
+ * [Calendlyr::Events::Invitee](docs/resources/events/invitee.md)
82
+ * [Calendlyr::Events::InviteeNoShow](docs/resources/events/invitee_no_show.md)
83
+ * [Scheduled Links](docs/resources/scheduling_link.md)
84
+ * [Shares](docs/resources/share.md)
85
+ * [Users](docs/resources/user.md)
86
+ * **Webhooks**
87
+ * [Calendlyr::Webhooks::Subscription](docs/resources/webhooks/subscription.md)
88
+ * [Calendlyr::Webhooks::Payload](docs/resources/webhooks/payload.md)
89
+ * [Calendlyr::Webhooks::InviteePayload](docs/resources/webhooks/invitee_payload.md)
171
90
 
172
91
  ## Contributing
173
92
 
@@ -183,4 +102,4 @@ When adding resources, add to the list of resources in lib/calendlyr. Additional
183
102
 
184
103
  Many thanks [@markets](https://github.com/markets) (our contributor in the shadows) for all comments, details and tips for this rubygem project and for made me grow professionally in my day by day :raised_hands:
185
104
 
186
- Thanks [@excid3](https://github.com/excid3) and his [Vultr.rb](https://github.com/excid3/vultr.rb) rubygem project.
105
+ Thanks [@excid3](https://github.com/excid3) and his [Vultr.rb](https://github.com/excid3/vultr.rb) rubygem project.
data/calendlyr.gemspec CHANGED
@@ -15,7 +15,6 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ["lib"]
20
19
 
21
20
  spec.add_development_dependency "rake", "~> 12.0"
@@ -0,0 +1,34 @@
1
+ # List Activity Log Entries Calendlyr::ActivityLog
2
+
3
+ This endpoint requires an Enterprise subscription.
4
+
5
+ ## Client requests
6
+
7
+ ### List
8
+
9
+ Returns a list of activity log entries
10
+
11
+ Visit official [API Doc](https://developer.calendly.com/api-docs/d37c7f031f339-list-activity-log-entries)
12
+
13
+ For the example bellow we will use only required parameters, but you can use any other parameter as well.
14
+
15
+ ```ruby
16
+ client.organizations.activity_log(organization: `organization_uri`)
17
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::ActivityLog, ...], @client=#<Calendlyr::Client>>
18
+ ```
19
+
20
+ ## Object methods
21
+
22
+ ### Associated Organization
23
+
24
+ ```ruby
25
+ user_busy_time.associated_organization
26
+ #=> #<Calendlyr::Organization>
27
+ ```
28
+
29
+ ### Associated Actor
30
+
31
+ ```ruby
32
+ user_busy_time.associated_actor
33
+ #=> #<Calendlyr::User>
34
+ ```
@@ -0,0 +1,5 @@
1
+ # Availability Rule Calendlyr::Availabilities::Rule
2
+
3
+ The rules for an availability schedule.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/3546c792f5695-availability-rule)
@@ -0,0 +1,50 @@
1
+ # User Availability Schedule Calendlyr::Availabilities::UserSchedule
2
+
3
+ The availability schedule set by the user.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/008bd39518269-user-availability-schedule)
6
+
7
+ ## Client requests
8
+
9
+ ### Retrieve
10
+
11
+ This will return the availability schedule of the given UUID.See [official API doc](https://developer.calendly.com/api-docs/3b1c2d5f97b5c-get-user-availability-schedule)
12
+
13
+ ```ruby
14
+ client.availabilities.retrieve_user_schedule(uuid: @uuid)
15
+ #=> #<Calendlyr::Availabilities::UserSchedule uri="https://api.calendly.com/user_availability_schedule/abc123", default=true, name="Working Hours", user="https://api.calendly.com/users/abc123", timezone="America/New_York", rules=[#<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="09:30">], wday="sunday", date="2022-12-31">], client=#<Calendlyr::Client>, uuid="abc123">
16
+ ```
17
+
18
+ ### List
19
+
20
+ Return the availability schedules of the given user. See [official API doc](https://developer.calendly.com/api-docs/8098de44af94c-list-user-availability-schedules)
21
+
22
+ ```ruby
23
+ client.availabilities.list_user_schedules(user: @user)
24
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Availabilities::UserSchedule uri="https://api.calendly.com/user_availability_schedule/abc123", default=true, name="Working Hours", user="https://api.calendly.com/users/abc123", timezone="America/New_York", rules=[#<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="09:30">], wday="sunday", date="2022-12-31">], client=#<Calendlyr::Client>, uuid="abc123">, #<Calendlyr::Availabilities::UserSchedule uri="https://api.calendly.com/user_availability_schedule/abc456", default=false, name="Evening Hours", user="https://api.calendly.com/users/abc123", timezone="America/New_York", rules=[#<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="monday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="tuesday">, #<OpenStruct type="wday", intervals=[], wday="wednesday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="thursday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="friday">, #<OpenStruct type="wday", intervals=[], wday="saturday">, #<OpenStruct type="date", intervals=[#<OpenStruct from="08:30", to="09:30">], date="2028-12-31">], client=#<Calendlyr::Client>, uuid="abc456">], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
25
+ ```
26
+
27
+ #### List on me
28
+
29
+ Use `me` user
30
+
31
+ ```ruby
32
+ client.me.availability_schedules
33
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Availabilities::UserSchedule uri="https://api.calendly.com/user_availability_schedule/abc123", default=true, name="Working Hours", user="https://api.calendly.com/users/abc123", timezone="America/New_York", rules=[#<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="09:30">], wday="sunday", date="2022-12-31">], client=#<Calendlyr::Client>, uuid="abc123">, #<Calendlyr::Availabilities::UserSchedule uri="https://api.calendly.com/user_availability_schedule/abc456", default=false, name="Evening Hours", user="https://api.calendly.com/users/abc123", timezone="America/New_York", rules=[#<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="monday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="tuesday">, #<OpenStruct type="wday", intervals=[], wday="wednesday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="thursday">, #<OpenStruct type="wday", intervals=[#<OpenStruct from="08:30", to="17:00">], wday="friday">, #<OpenStruct type="wday", intervals=[], wday="saturday">, #<OpenStruct type="date", intervals=[#<OpenStruct from="08:30", to="09:30">], date="2028-12-31">], client=#<Calendlyr::Client>, uuid="abc456">], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
34
+ ```
35
+
36
+ ## Object methods
37
+
38
+ ### Associated User
39
+
40
+ ```ruby
41
+ user_schedule.associated_user
42
+ #=> #<Calendlyr::User>
43
+ ```
44
+
45
+ ### Associated Rules
46
+
47
+ ```ruby
48
+ user_schedule.rules
49
+ #=> [#<Calendlyr::Availabilities::Rule>, ...]
50
+ ```
@@ -0,0 +1,28 @@
1
+ # User Busy Time Calendlyr::Availabilities::UserBusyTime
2
+
3
+ An internal or external scheduled event for a given user.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/acae53ca17454-user-busy-time)
6
+
7
+ ## Client requests
8
+
9
+ ### List
10
+
11
+ Visit official [API Doc](https://developer.calendly.com/api-docs/5920076156501-list-user-busy-times)
12
+
13
+ Date range can be no greater than 1 week (7 days).
14
+
15
+ For the example bellow we will use only required parameters, but you can use any other parameter as well.
16
+ ```ruby
17
+ client.availabilities.list_user_busy_times(user: `user_uri`, start_time: `start_time`, end_time: `end_time`)
18
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Availabilities::UserBusyTime type="calendly", start_time="2020-01-02T20:00:00.000000Z", end_time="2020-01-02T20:30:00.000000Z", buffered_start_time="2020-01-02T19:30:00.000000Z", buffered_end_time="2020-01-02T21:00:00.000000Z", event=#<OpenStruct uri="https://api.calendly.com/scheduled_events/abc123">, client=#<Calendlyr::Client>, uuid=nil>, #<Calendlyr::UserBusyTime type="calendly", start_time="2020-01-05T20:00:00.000000Z", end_time="2020-01-05T20:30:00.000000Z", buffered_start_time="2020-01-05T19:30:00.000000Z", buffered_end_time="2020-01-05T21:00:00.000000Z", event=#<OpenStruct uri="https://api.calendly.com/scheduled_events/abc12345">, client=#<Calendlyr::Client>, uuid=nil>, #<Calendlyr::UserBusyTime type="external", start_time="2020-01-07T20:00:00.000000Z", end_time="2020-01-07T20:30:00.000000Z", client=#<Calendlyr::Client>, uuid=nil>], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
19
+ ```
20
+
21
+ ## Object methods
22
+
23
+ ### Associated Event
24
+
25
+ ```ruby
26
+ user_busy_time.associated_event
27
+ #=> #<Calendlyr::Event>
28
+ ```
@@ -0,0 +1,19 @@
1
+ # Data Compliance
2
+
3
+ ## Delete Invitee Data
4
+
5
+ Remove invitee data from all previously booked events in your organization..
6
+ Visit official [API Doc](https://developer.calendly.com/api-docs/4cf896120a018-delete-invitee-data)
7
+
8
+ ```ruby
9
+ client.data_compliance.delete_invitee_data(emails: %w[test@email.org test2@email.org])
10
+ ```
11
+
12
+ ## Delete Scheduled Event Data
13
+
14
+ Remove scheduled events data within a time range for your organization.
15
+ Visit official [API Doc](https://developer.calendly.com/api-docs/fc9211ad9b551-delete-scheduled-event-data)
16
+
17
+ ```ruby
18
+ client.data_compliance.delete_scheduled_event_data(start_time: "2019-01-02T03:04:05.678123Z", end_time: "2021-01-01T02:04:05.678123Z")
19
+ ```
@@ -0,0 +1,21 @@
1
+ # Available Time Calendlyr::EventTypes::AvailableTime
2
+
3
+ An available meeting time slot for the given event type.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/2d8d322931358-event-type-available-time)
6
+
7
+ ## Client requests
8
+
9
+ ### List
10
+ Returns a list of available times for an event type within a specified date range.
11
+
12
+ Date range can be no greater than 1 week (7 days).
13
+
14
+ For the examples bellow we will use only required parameters, but you can use any other parameter as well.
15
+
16
+ Visit official [API Doc](https://developer.calendly.com/api-docs/6a1be82aef359-list-event-type-available-times)
17
+
18
+ ```ruby
19
+ client.event_types.list_available_times(event_type, event_type, start_time: start_time, end_time: end_time)
20
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::EventTypes::AvailableTime>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
21
+ ```
@@ -0,0 +1,55 @@
1
+ # Event Type Calendlyr::EventType
2
+
3
+ A configuration for an Event.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/f3185c91567db-event-type)
6
+
7
+ ## Client requests
8
+
9
+ ### Retrieve
10
+
11
+ Returns information about a specified Event Type.
12
+
13
+ Visit official [API Doc](https://developer.calendly.com/api-docs/c1f9db4a585da-get-event-type)
14
+
15
+ ```ruby
16
+ client.event_types.retrieve(uuid: @uuid)
17
+ #=> #<Calendlyr::EventType>
18
+ ```
19
+
20
+ ### List
21
+ Returns all Event Types associated with a specified User.
22
+
23
+ Visit official [API Doc](https://developer.calendly.com/api-docs/25a4ece03c1bc-list-user-s-event-types)
24
+
25
+ For the examples bellow we will use only required parameters, but you can use any other parameter as well.
26
+ ```ruby
27
+ client.event_types.list(user: @user)
28
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::EventType>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
29
+
30
+ client.event_types.list(organization: @organization)
31
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::EventType>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
32
+ ```
33
+
34
+ ## Object methods
35
+
36
+ ### Associated Profile
37
+
38
+ ```ruby
39
+ event_type.associated_profile
40
+ #=> #<Calendlyr::EventTypes::Profile>
41
+ ```
42
+
43
+ ### Create Share
44
+
45
+ ```ruby
46
+ event_type.create_share
47
+ #=> #<Calendlyr::Share>
48
+ ```
49
+
50
+ ### Available Times
51
+
52
+ ```ruby
53
+ event_type.available_times(start_time: @start_time, end_time: @end_time, ...)
54
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::EventTypes::AvailableTime>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
55
+ ```
@@ -0,0 +1,29 @@
1
+ # Membership (Host) Calendlyr::EventTypes::Membership
2
+
3
+ ## Client requests
4
+
5
+ ### List
6
+ Fetch list of event type hosts.
7
+
8
+ Visit official [API Doc](https://developer.calendly.com/api-docs/9e27c9bd793da-list-event-type-hosts)
9
+
10
+ ```ruby
11
+ client.event_types.list_memberships(event_type, event_type)
12
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::EventTypes::Membership>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
13
+ ```
14
+
15
+ ## Object methods
16
+
17
+ ### Associated Event Type
18
+
19
+ ```ruby
20
+ membership.associated_event_type
21
+ #=> #<Calendlyr::EventType>
22
+ ```
23
+
24
+ ### Associated Member
25
+
26
+ ```ruby
27
+ membership.associated_member
28
+ #=> [#<Calendlyr::User>, ...]
29
+ ```
@@ -0,0 +1,13 @@
1
+ # Profile Calendlyr::EventTypes::Profile
2
+
3
+ Visit official [API Doc](https://developer.calendly.com/api-docs/c2NoOjU5MTM5NQ-profile)
4
+
5
+ ## Object methods
6
+
7
+ ### Associated Owner
8
+
9
+ ```ruby
10
+ profile.associated_owner
11
+ #=> [#<Calendlyr::User>, ...]
12
+ ```
13
+
@@ -0,0 +1,18 @@
1
+ # Cancellation Calendlyr::Events::Cancellation
2
+
3
+ Provides data pertaining to the cancellation of the Event or the Invitee.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/77497aba237ee-cancellation)
6
+
7
+ ## Client requests
8
+
9
+ ### Cancel event
10
+
11
+ Cancels specified event.
12
+
13
+ Visit official [API Doc](https://developer.calendly.com/api-docs/afb2e9fe3a0a0-cancel-event)
14
+
15
+ ```ruby
16
+ client.events.cancel(uuid: event_uuid, reason: "I'm bussy")
17
+ #=> #<Calendlyr::Events::Cancellation>
18
+ ```
@@ -0,0 +1,62 @@
1
+ # Event Calendlyr::Event
2
+
3
+ Information about a scheduled meeting.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/504508461e486-event)
6
+
7
+ ## Client requests
8
+
9
+ ### Retrieve
10
+
11
+ Returns information about a specified Event.
12
+
13
+ Visit official [API Doc](https://developer.calendly.com/api-docs/e2f95ebd44914-get-event)
14
+
15
+ ```ruby
16
+ client.events.retrieve(uuid: uuid)
17
+ #=> #<Calendlyr::Event>
18
+ ```
19
+
20
+ ### List
21
+
22
+ Returns a list of Events.
23
+
24
+ Visit official [API Doc](https://developer.calendly.com/api-docs/2d5ed9bbd2952-list-events)
25
+
26
+ ```ruby
27
+ client.events.list(organization: organization, user: user)
28
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Event>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
29
+
30
+ client.events.list(organization: organization, group: group)
31
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Event>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
32
+
33
+ client.events.list(user: user)
34
+ #=> #<Calendlyr::Collection @data=[#<Calendlyr::Event>, ...], @count=nil, @next_page=nil, @next_page_token=nil, @client=#<Calendlyr::Client>>
35
+ ```
36
+
37
+ ### Cancel
38
+
39
+ Cancels specified event.
40
+
41
+ Visit official [API Doc](https://developer.calendly.com/api-docs/afb2e9fe3a0a0-cancel-event)
42
+
43
+ ```ruby
44
+ client.events.cancel(uuid: event_uuid, reason: "I'm bussy")
45
+ #=> #<Calendlyr::Events::Cancellation>
46
+ ```
47
+
48
+ ## Object methods
49
+
50
+ ### Memberships
51
+
52
+ ```ruby
53
+ event.memberships
54
+ #=> [#<Calendlyr::User>, ...]
55
+ ```
56
+
57
+ ### Cancel
58
+
59
+ ```ruby
60
+ event.cancel(reason: "I'm bussy")
61
+ #=> #<Calendlyr::Events::Cancellation>
62
+ ```
@@ -0,0 +1,5 @@
1
+ # Guest Calendlyr::Events::Guest
2
+
3
+ An individual whom an invitee has invited to be a guest attendee to an event.
4
+
5
+ Visit official [API Doc](https://developer.calendly.com/api-docs/7307270523502-guest)