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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0772a7b82da14fecdc3976b9cbc2a18cec54ca9e3eb2aaeedfc1df6e220d8cde
4
- data.tar.gz: 985654c6b08521739aeb8b027c17c7094a1c4e49b1e3dbb291f52747f7e261b5
3
+ metadata.gz: 4e919a79ee8a607c497ff0e9b7a3dbf8e035d31c2c1687303806c5fd80de1f55
4
+ data.tar.gz: adf1ff59d69fdcf9c6e34804b7d352d27e499a62765d488ee9acf9418ed997e3
5
5
  SHA512:
6
- metadata.gz: 92c7369f875233d12ccd063c47ce26c0be52f7443339aa73eccc648a69825ad27469a5ada5008c52f82ea504f98305b153705b0189f8da66e36fa6bf4354a364
7
- data.tar.gz: d6b41ea040f57e158e12ca3a83d63fc60d5aadce62d577e17830e1fb5c82a7d8aad6995a8dbcbf04a62a0078a7356e850e26bce23afacea9d379c221e1b69fb2
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 complete rubygem for [Calendly](https://calendly.com/). Currently supports [API v2](https://calendly.stoplight.io/docs/api-docs).
10
+ Easy and comprehensive rubygem for [Calendly](https://calendly.com/). Currently supports [API v2](https://calendly.stoplight.io/docs/api-docs).
10
11
 
11
- Just needed a Personal Access Token.
12
+ You just need a Personal Access Token.
12
13
 
13
14
  ## Dependencies
14
15
 
15
16
  No dependencies :tada:
16
17
 
17
- We know about the importance of not add dependencies that you don't want.
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.0'
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 pass in your token. You can generate your Personal Access Token at [https://calendly.com/integrations/api_webhooks](https://calendly.com/integrations/api_webhooks)
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 gives you access to each of the resources.
46
-
46
+ The client then provides access to all of the resources.
47
47
 
48
48
  ### Resources
49
49
 
50
- The gem maps as closely as we can to the Calendly API so you can easily convert API examples to gem code.
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 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.
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, add to the list of resources in lib/calendlyr. Additionally, write a spec and add it to the list in the README.
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 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:
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, next_page_token: results.next_page_token)
19
+ client.me.events(count: 5, page_token: results.next_page_token)
20
20
  #=> Calendlyr::Collection
21
21
  ```
@@ -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
 
@@ -7,7 +7,7 @@ module Calendlyr
7
7
  class Resource
8
8
  attr_reader :client
9
9
 
10
- ERROR_CODES = %w[400 401 403 404 424 500]
10
+ ERROR_CODES = %w[400 401 403 404 424 429 500]
11
11
 
12
12
  def initialize(client)
13
13
  @client = client
@@ -1,3 +1,3 @@
1
1
  module Calendlyr
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendlyr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - araluce