cronofy 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cronofy/client.rb +22 -0
- data/lib/cronofy/version.rb +1 -1
- data/spec/lib/cronofy/client_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e05ba31d90d58a0bd718c72ef0bc0fddebfb7b4
|
4
|
+
data.tar.gz: 216e2f45e802a57f00458ef20ce350cafc564011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6279e22339f7eac6d295e17c2162ac6de75bcc2b523ef3d785707a2430773c154a411da1620b0c2a543ba5a6c3dfd7cdb957c0542b54d0643f7f9dfeb9efea1b
|
7
|
+
data.tar.gz: 15b4488e3af2600e69e698969d33ffdc4085b5b5ffa741c7818adf51ea3fd5b6822fec5c833c685ff9adbda5a8b81e428210420edb04d23b1fe66cc9d879b834
|
data/lib/cronofy/client.rb
CHANGED
@@ -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.
|
data/lib/cronofy/version.rb
CHANGED
@@ -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
|
+
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
|
+
date: 2015-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|