timekit 0.2.1 → 0.2.2
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/timekit/event/client.rb +33 -25
- data/lib/timekit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05a6531ec3a16e156d16744eccb237a0b7b607af
|
4
|
+
data.tar.gz: 6cf88078a35e0e861076c957cb0fea93ee11b05d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c3b62c9dab0d8c8c0a99f8f2e4658f0067647b01c5e0dac99bc9a33dc07412232a789a5f79dfc4cc5fc18740862e8dafe9108e83fd147ca5741f3990db5b76b
|
7
|
+
data.tar.gz: e08e1ee82d2137ae7c8957c8d22f8c9eb2a38a8030271e5502b39a024201fcc94fa2f469703bcbc23f0a767a4a2f1c969f2889dfceb8843f6acbe6c73294f6b9
|
data/lib/timekit/event/client.rb
CHANGED
@@ -40,20 +40,18 @@ module Timekit
|
|
40
40
|
calendar_id: calendar_id
|
41
41
|
}
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
!value.nil?
|
56
|
-
end
|
43
|
+
params = set_optional_params(
|
44
|
+
binding,
|
45
|
+
[
|
46
|
+
:participants,
|
47
|
+
:invite,
|
48
|
+
:description,
|
49
|
+
:my_rsvp,
|
50
|
+
:sync_provider,
|
51
|
+
:all_day
|
52
|
+
],
|
53
|
+
params
|
54
|
+
)
|
57
55
|
|
58
56
|
post(API_PATH, params)
|
59
57
|
end
|
@@ -71,24 +69,34 @@ module Timekit
|
|
71
69
|
params[:start] = event_start if event_start
|
72
70
|
params[:end] = event_end if event_end
|
73
71
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
params = set_optional_params(
|
73
|
+
binding,
|
74
|
+
[
|
75
|
+
:what,
|
76
|
+
:where,
|
77
|
+
:participants,
|
78
|
+
:all_day
|
79
|
+
],
|
80
|
+
params
|
81
|
+
)
|
80
82
|
|
83
|
+
put(API_PATH + '/' + id.to_s, params)
|
84
|
+
end
|
85
|
+
|
86
|
+
def delete(id)
|
87
|
+
super(API_PATH + '/' + id.to_s)
|
88
|
+
end
|
89
|
+
|
90
|
+
private
|
91
|
+
|
92
|
+
def set_optional_params(binding, optional_params, params)
|
81
93
|
optional_params.each do |name|
|
82
94
|
value = binding.local_variable_get(name)
|
83
95
|
params[name.to_sym] = value if
|
84
96
|
[true, false].include?(value) || !value.nil?
|
85
97
|
end
|
86
98
|
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
def delete(id)
|
91
|
-
super(API_PATH + '/' + id.to_s)
|
99
|
+
params
|
92
100
|
end
|
93
101
|
end
|
94
102
|
end
|
data/lib/timekit/version.rb
CHANGED