calendlyr 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +12 -12
- data/docs/resources/pagination.md +1 -1
- data/lib/calendlyr/error.rb +2 -7
- data/lib/calendlyr/resource.rb +1 -1
- data/lib/calendlyr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e919a79ee8a607c497ff0e9b7a3dbf8e035d31c2c1687303806c5fd80de1f55
|
4
|
+
data.tar.gz: adf1ff59d69fdcf9c6e34804b7d352d27e499a62765d488ee9acf9418ed997e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dbea6a806ad7cc8ce2e661d1af464d184d54cfbba44dae35c33d3e7a07e67c58a7f7fd8c6c33fc08b0663cef10d35fc69f442bc964b7eb0d28f6541137cbb49
|
7
|
+
data.tar.gz: 12a946f4b07d17598560d3307e2c18acabc39714484b934af3aa46a764ea40e5a2cf7f8ec4cbc3ff291ab5f04264f82b873b24dec11390213d17f24e1169d93a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.7.1]
|
6
|
+
* Adding support for 429 responses from Calendly API
|
7
|
+
|
8
|
+
[0.7.1]: https://github.com/araluce/calendlyr/compare/v0.7.0...v0.7.1
|
9
|
+
|
5
10
|
## [0.7.0]
|
6
11
|
* First real usable release :tada:
|
7
12
|
|
data/README.md
CHANGED
@@ -3,18 +3,19 @@
|
|
3
3
|
[![codecov](https://codecov.io/gh/araluce/calendlyr/branch/master/graph/badge.svg?token=YSUU4PHM6Y)](https://codecov.io/gh/araluce/calendlyr)
|
4
4
|
![example workflow](https://github.com/araluce/calendlyr/actions/workflows/ci.yml/badge.svg)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/calendlyr.svg)](https://badge.fury.io/rb/calendlyr)
|
6
|
+
![Gem Downloads (for specified version)](https://img.shields.io/gem/dv/calendlyr/0.7.0)
|
6
7
|
|
7
8
|
# Calendly API Rubygem
|
8
9
|
|
9
|
-
Easy and
|
10
|
+
Easy and comprehensive rubygem for [Calendly](https://calendly.com/). Currently supports [API v2](https://calendly.stoplight.io/docs/api-docs).
|
10
11
|
|
11
|
-
|
12
|
+
You just need a Personal Access Token.
|
12
13
|
|
13
14
|
## Dependencies
|
14
15
|
|
15
16
|
No dependencies :tada:
|
16
17
|
|
17
|
-
We
|
18
|
+
We understand the importance of not adding unwanted dependencies.
|
18
19
|
|
19
20
|
## 📚 Docs
|
20
21
|
|
@@ -23,7 +24,7 @@ We know about the importance of not add dependencies that you don't want.
|
|
23
24
|
Add this line to your application's Gemfile:
|
24
25
|
|
25
26
|
```ruby
|
26
|
-
gem 'calendlyr', '0.7.
|
27
|
+
gem 'calendlyr', '0.7.1'
|
27
28
|
```
|
28
29
|
|
29
30
|
And then execute:
|
@@ -36,20 +37,19 @@ Or install it yourself as:
|
|
36
37
|
|
37
38
|
### Usage
|
38
39
|
|
39
|
-
To access the API, you'll need to create a `Calendlyr::Client` and
|
40
|
+
To access the API, you'll need to create a `Calendlyr::Client` and provide your token. You can generate your Personal Access Token at [https://calendly.com/integrations/api_webhooks](https://calendly.com/integrations/api_webhooks)
|
40
41
|
|
41
42
|
```ruby
|
42
43
|
client = Calendlyr::Client.new(token: ENV["CALENDLY_TOKEN"])
|
43
44
|
```
|
44
45
|
|
45
|
-
The client then
|
46
|
-
|
46
|
+
The client then provides access to all of the resources.
|
47
47
|
|
48
48
|
### Resources
|
49
49
|
|
50
|
-
The gem
|
50
|
+
The gem is designed to closely mirror the Calendly API, making it easy to convert API examples into gem code
|
51
51
|
|
52
|
-
Responses are created as objects like `Calendlyr::Event`. Having types like `Calendlyr::User` is
|
52
|
+
Responses are created as objects, like `Calendlyr::Event`. Having types like `Calendlyr::User` is useful for understanding the type of object you're working with. These objects are built using `OpenStruct`, allowing you to access data in a Ruby-like way.
|
53
53
|
|
54
54
|
* [Pagination](docs/resources/pagination.md)
|
55
55
|
* **Activity Log**
|
@@ -96,10 +96,10 @@ Responses are created as objects like `Calendlyr::Event`. Having types like `Cal
|
|
96
96
|
4. Push to the branch (`git push origin my-new-feature`)
|
97
97
|
5. Create a new Pull Request
|
98
98
|
|
99
|
-
When adding resources,
|
99
|
+
When adding resources, update the list of resources in `lib/calendlyr`. Additionally, write a spec and include it in the list in the README
|
100
100
|
|
101
101
|
## Thanks
|
102
102
|
|
103
|
-
Many thanks [@markets](https://github.com/markets) (our
|
103
|
+
Many thanks to[@markets](https://github.com/markets) (our behind-the-scenes contributor) for all the comments, insights, and tips on this Ruby gem project, and for helping me grow professionally day by day :raised_hands:
|
104
104
|
|
105
|
-
Thanks [@excid3](https://github.com/excid3) and his [Vultr.rb](https://github.com/excid3/vultr.rb) rubygem project.
|
105
|
+
Thanks also to [@excid3](https://github.com/excid3) and his [Vultr.rb](https://github.com/excid3/vultr.rb) rubygem project.
|
@@ -16,6 +16,6 @@ results.next_page_token
|
|
16
16
|
#=> "KfKBetd7bS0wsFINjYky9mp8ZJXv76aL"
|
17
17
|
|
18
18
|
# Retrieve the next page
|
19
|
-
client.me.events(count: 5,
|
19
|
+
client.me.events(count: 5, page_token: results.next_page_token)
|
20
20
|
#=> Calendlyr::Collection
|
21
21
|
```
|
data/lib/calendlyr/error.rb
CHANGED
@@ -1,19 +1,13 @@
|
|
1
1
|
module Calendlyr
|
2
2
|
class Error < StandardError; end
|
3
|
-
|
4
3
|
class PermissionDenied < StandardError; end
|
5
|
-
|
6
4
|
class BadRequest < StandardError; end
|
7
|
-
|
8
5
|
class PaymentRequired < StandardError; end
|
9
|
-
|
10
6
|
class Unauthenticated < StandardError; end
|
11
|
-
|
12
7
|
class NotFound < StandardError; end
|
13
|
-
|
14
8
|
class ExternalCalendarEror < StandardError; end
|
15
|
-
|
16
9
|
class InternalServerError < StandardError; end
|
10
|
+
class TooManyRequestsEror < StandardError; end
|
17
11
|
|
18
12
|
class ResponseErrorHandler
|
19
13
|
ERROR_TYPES = {
|
@@ -22,6 +16,7 @@ module Calendlyr
|
|
22
16
|
"403" => PermissionDenied,
|
23
17
|
"404" => NotFound,
|
24
18
|
"424" => ExternalCalendarEror,
|
19
|
+
"429" => TooManyRequestsEror,
|
25
20
|
"500" => InternalServerError
|
26
21
|
}
|
27
22
|
|
data/lib/calendlyr/resource.rb
CHANGED
data/lib/calendlyr/version.rb
CHANGED