cronofy 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cronofy/client.rb +24 -0
- data/lib/cronofy/version.rb +1 -1
- data/spec/lib/cronofy/client_spec.rb +15 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6887697315abca3647eb88c988ea0b43d9544cd7
|
4
|
+
data.tar.gz: b544963a395d4e15bda4f39e5ab6b1f8cb8a6ed3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37ba86e3f3fd977bf469289e1108ca90dc6d72d0296c3de48c5929a4ec109d143a8e372cc64c1ffc313627713f6f0e9bc5fb1479959f9dde1ee01a09b2137fa3
|
7
|
+
data.tar.gz: 9363a99117626aa73c876d99f0b14a89f3928ecbbbfa03c4c22fe42e7f3a5949660cf743551127aad93e7c295e14fd1b919b7fc0e7639809cca89d92da338684
|
data/lib/cronofy/client.rb
CHANGED
@@ -270,6 +270,30 @@ module Cronofy
|
|
270
270
|
nil
|
271
271
|
end
|
272
272
|
|
273
|
+
# Public: Deletes an external event from the specified calendar
|
274
|
+
#
|
275
|
+
# calendar_id - The String Cronofy ID for the calendar to delete the event
|
276
|
+
# from.
|
277
|
+
# event_uid - The unique ID of the event to delete.
|
278
|
+
#
|
279
|
+
# Returns nothing.
|
280
|
+
#
|
281
|
+
# Raises Cronofy::CredentialsMissingError if no credentials available.
|
282
|
+
# Raises Cronofy::AuthenticationFailureError if the access token is no
|
283
|
+
# longer valid.
|
284
|
+
# Raises Cronofy::AuthorizationFailureError if the access token does not
|
285
|
+
# include the required scope or the client has not been granted elevated
|
286
|
+
# permissions to the calendar.
|
287
|
+
# Raises Cronofy::NotFoundError if the calendar does not exist.
|
288
|
+
# Raises Cronofy::InvalidRequestError if the request contains invalid
|
289
|
+
# parameters.
|
290
|
+
# Raises Cronofy::TooManyRequestsError if the request exceeds the rate
|
291
|
+
# limits for the application.
|
292
|
+
def delete_external_event(calendar_id, event_uid)
|
293
|
+
delete("/v1/calendars/#{calendar_id}/events", event_uid: event_uid)
|
294
|
+
nil
|
295
|
+
end
|
296
|
+
|
273
297
|
# Public: Deletes all events you are managing for the account.
|
274
298
|
#
|
275
299
|
# See http://www.cronofy.com/developers/api/alpha#bulk-delete-events for
|
data/lib/cronofy/version.rb
CHANGED
@@ -527,6 +527,21 @@ describe Cronofy::Client do
|
|
527
527
|
it_behaves_like 'a Cronofy request'
|
528
528
|
end
|
529
529
|
|
530
|
+
describe '#delete_external_event' do
|
531
|
+
let(:calendar_id) { 'calendar_id_123'}
|
532
|
+
let(:request_url) { "https://api.cronofy.com/v1/calendars/#{calendar_id}/events" }
|
533
|
+
let(:event_uid) { 'external_event_1023' }
|
534
|
+
let(:method) { :delete }
|
535
|
+
let(:request_headers) { json_request_headers }
|
536
|
+
let(:request_body) { { :event_uid => event_uid } }
|
537
|
+
let(:correct_response_code) { 202 }
|
538
|
+
let(:correct_response_body) { nil }
|
539
|
+
|
540
|
+
subject { client.delete_external_event(calendar_id, event_uid) }
|
541
|
+
|
542
|
+
it_behaves_like 'a Cronofy request'
|
543
|
+
end
|
544
|
+
|
530
545
|
describe '#delete_all_events' do
|
531
546
|
let(:request_url) { "https://api.cronofy.com/v1/events" }
|
532
547
|
let(:method) { :delete }
|
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.12.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: 2016-
|
12
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.6.
|
151
|
+
rubygems_version: 2.6.6
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Cronofy - one API for all the calendars
|