cronofy 0.4.2 → 0.5.0

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
  SHA1:
3
- metadata.gz: ccba6e707ebc229cc20719545f41f38094f908a8
4
- data.tar.gz: 5485cf80cccc15bc4bc52967e1b59ba31466aeb6
3
+ metadata.gz: 0e05ba31d90d58a0bd718c72ef0bc0fddebfb7b4
4
+ data.tar.gz: 216e2f45e802a57f00458ef20ce350cafc564011
5
5
  SHA512:
6
- metadata.gz: b4ac8fabfe08923fb6c1ca00ef0dc76b9fe546e822a6b377e72f04830640524cf0db8508bcc3c53134890bc4b9ccd0443f5701da28e39d3d8354fc453e3ae400
7
- data.tar.gz: 230810614dbb2bf45f9a2c12f55979f6aebc88f4f6a32fdcc2573da865270502d3f4d063bb00e229ec38885ede13e690c5d926a9b889324b57719f970d6ef6d0
6
+ metadata.gz: 6279e22339f7eac6d295e17c2162ac6de75bcc2b523ef3d785707a2430773c154a411da1620b0c2a543ba5a6c3dfd7cdb957c0542b54d0643f7f9dfeb9efea1b
7
+ data.tar.gz: 15b4488e3af2600e69e698969d33ffdc4085b5b5ffa741c7818adf51ea3fd5b6822fec5c833c685ff9adbda5a8b81e428210420edb04d23b1fe66cc9d879b834
@@ -206,6 +206,28 @@ module Cronofy
206
206
  nil
207
207
  end
208
208
 
209
+ # Public: Deletes all events you are managing for the account.
210
+ #
211
+ # See http://www.cronofy.com/developers/api/alpha#bulk-delete-events for
212
+ # reference.
213
+ #
214
+ # Returns nothing.
215
+ #
216
+ # Raises Cronofy::CredentialsMissingError if no credentials available.
217
+ # Raises Cronofy::AuthenticationFailureError if the access token is no
218
+ # longer valid.
219
+ # Raises Cronofy::AuthorizationFailureError if the access token does not
220
+ # include the required scope.
221
+ # Raises Cronofy::NotFoundError if the calendar does not exist.
222
+ # Raises Cronofy::InvalidRequestError if the request contains invalid
223
+ # parameters.
224
+ # Raises Cronofy::TooManyRequestsError if the request exceeds the rate
225
+ # limits for the application.
226
+ def delete_all_events
227
+ delete("/v1/events", all_events: true)
228
+ nil
229
+ end
230
+
209
231
  # Public: Creates a notification channel with a callback URL
210
232
  #
211
233
  # callback_url - A String specifing the callback URL for the channel.
@@ -1,3 +1,3 @@
1
1
  module Cronofy
2
- VERSION = "0.4.2".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -452,6 +452,19 @@ describe Cronofy::Client do
452
452
 
453
453
  it_behaves_like 'a Cronofy request'
454
454
  end
455
+
456
+ describe '#delete_all_events' do
457
+ let(:request_url) { "https://api.cronofy.com/v1/events" }
458
+ let(:method) { :delete }
459
+ let(:request_headers) { json_request_headers }
460
+ let(:request_body) { { :all_events => true } }
461
+ let(:correct_response_code) { 202 }
462
+ let(:correct_response_body) { nil }
463
+
464
+ subject { client.delete_all_events }
465
+
466
+ it_behaves_like 'a Cronofy request'
467
+ end
455
468
  end
456
469
 
457
470
  describe 'Channels' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronofy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergii Paryzhskyi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-12 00:00:00.000000000 Z
12
+ date: 2015-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2