cronofy 0.13.0 → 0.14.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 +34 -0
- data/lib/cronofy/version.rb +1 -1
- data/spec/lib/cronofy/client_spec.rb +16 -0
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbcfb0a303cda992a3a84fb7caeb80aba83240d5
|
4
|
+
data.tar.gz: 09c5a5f54d5614136873797be63e096c15cb6257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd060de118a1e5d3458b1725c32c31c92b24d0fc39f8f0d05bf4cc7bbbd3d994238fb786e79c03070a153fc838325c82183485442b5f4842890bf21e49ca0e73
|
7
|
+
data.tar.gz: 00704493c9b11c169dd04eed55bea3594d637d2ba13d54cead198bc2260b80c5c186009cc660c35fc3a68aa83a3a144efb48242000245de75f7f72ae1287632e
|
data/lib/cronofy/client.rb
CHANGED
@@ -444,6 +444,40 @@ module Cronofy
|
|
444
444
|
parse_json(UserInfo, nil, response)
|
445
445
|
end
|
446
446
|
|
447
|
+
|
448
|
+
# Public: Changes the participation status for a calendar event
|
449
|
+
#
|
450
|
+
# calendar_id - The String Cronofy ID for the calendar to delete the event
|
451
|
+
# from.
|
452
|
+
# event_uid - A String uniquely identifying the event for your application
|
453
|
+
# (note: this is NOT an ID generated by Cronofy).
|
454
|
+
# status - A String or Symbol to set the participation status of the
|
455
|
+
# invite to
|
456
|
+
#
|
457
|
+
#
|
458
|
+
# See http://www.cronofy.com/developers/api#delete-event for reference.
|
459
|
+
#
|
460
|
+
# Returns nothing.
|
461
|
+
#
|
462
|
+
# Raises Cronofy::CredentialsMissingError if no credentials available.
|
463
|
+
# Raises Cronofy::AuthenticationFailureError if the access token is no
|
464
|
+
# longer valid.
|
465
|
+
# Raises Cronofy::AuthorizationFailureError if the access token does not
|
466
|
+
# include the required scope.
|
467
|
+
# Raises Cronofy::NotFoundError if the calendar does not exist.
|
468
|
+
# Raises Cronofy::InvalidRequestError if the request contains invalid
|
469
|
+
# parameters.
|
470
|
+
# Raises Cronofy::TooManyRequestsError if the request exceeds the rate
|
471
|
+
# limits for the application.
|
472
|
+
def change_participation_status(calendar_id, event_uid, status)
|
473
|
+
body = {
|
474
|
+
status: status.to_s,
|
475
|
+
}
|
476
|
+
|
477
|
+
url = "/v1/calendars/#{calendar_id}/events/#{event_uid}/participation_status"
|
478
|
+
post(url, body)
|
479
|
+
end
|
480
|
+
|
447
481
|
# Public: Attempts to authorize the email with impersonation from a service
|
448
482
|
# account
|
449
483
|
#
|
data/lib/cronofy/version.rb
CHANGED
@@ -542,6 +542,22 @@ describe Cronofy::Client do
|
|
542
542
|
it_behaves_like 'a Cronofy request'
|
543
543
|
end
|
544
544
|
|
545
|
+
describe '#change_participation_status' do
|
546
|
+
let(:calendar_id) { 'calendar_id_123'}
|
547
|
+
let(:request_url) { "https://api.cronofy.com/v1/calendars/#{calendar_id}/events/#{event_uid}/participation_status" }
|
548
|
+
let(:event_uid) { 'evt_external_54008b1a4a41730f8d5c6037' }
|
549
|
+
let(:method) { :post }
|
550
|
+
let(:request_headers) { json_request_headers }
|
551
|
+
let(:status) { 'accepted' }
|
552
|
+
let(:request_body) { { :status => status } }
|
553
|
+
let(:correct_response_code) { 202 }
|
554
|
+
let(:correct_response_body) { nil }
|
555
|
+
|
556
|
+
subject { client.change_participation_status(calendar_id, event_uid, status) }
|
557
|
+
|
558
|
+
it_behaves_like 'a Cronofy request'
|
559
|
+
end
|
560
|
+
|
545
561
|
describe '#delete_all_events' do
|
546
562
|
let(:request_url) { "https://api.cronofy.com/v1/events" }
|
547
563
|
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.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergii Paryzhskyi
|
@@ -9,96 +9,96 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: hashie
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '2.1'
|
35
|
-
- -
|
35
|
+
- - <
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '4'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - '>='
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '2.1'
|
45
|
-
- -
|
45
|
+
- - <
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.6'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.6'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rake
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '10.0'
|
76
76
|
- !ruby/object:Gem::Dependency
|
77
77
|
name: rspec
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.2'
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '3.2'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: webmock
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.21'
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '1.21'
|
104
104
|
description: Ruby wrapper for Cronofy's unified calendar API
|
@@ -138,17 +138,17 @@ require_paths:
|
|
138
138
|
- lib
|
139
139
|
required_ruby_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- -
|
141
|
+
- - '>='
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- -
|
146
|
+
- - '>='
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.6.
|
151
|
+
rubygems_version: 2.6.1
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Cronofy - one API for all the calendars
|