omnievent-outlook 0.1.0.pre5 → 0.1.0.pre7

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
  SHA256:
3
- metadata.gz: d854e155be65942ba10f083f8ce99c2b445ce2633dfb3bb86e929b3d11212855
4
- data.tar.gz: 21d135106721c9afb1cb3eeef7330e246d644211d6c3fef46a3aa265fad5dd85
3
+ metadata.gz: 4c31a2830831de18b622d66c54dea517ce368c5c1b113a093e6409fefcf712b1
4
+ data.tar.gz: 8a670b51d9e3463348e6a6f05a2abb22eb1be267cd415490117b07c3291dc09c
5
5
  SHA512:
6
- metadata.gz: 258d8096e13f0b452257ff51d6ff67e3a8416f55d2e584cdfa52d93879c3dff3adc112e6c25bf62af227674a9a5f3fe8061add0a67512e848a8f3ab05bf75ae7
7
- data.tar.gz: 9ba47485eb53d99f8e2a603632e87f6884111ea4c517d7fa6bd5e462c7970eb03f7d04f8908379b1533f7d8e3fcf7a7dcbc286f600012e100b88460204bb24b4
6
+ metadata.gz: b268a3418033ce5aa5fc4d9cf72ed2a01f0752686d6d392e73854728687e022686ba66a71c7294a81f016c89a1be875e8f4cf0da0bfd430e4b1f5c4882947940
7
+ data.tar.gz: 6e52822366abe54c690b930439233788d09b34c9fb4e5eb9b4e6dab5261e91e9219ae7d4c69f9d0704e1d2964cd09522e9705a593eab33a9ed37e213474d3ae5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omnievent-outlook (0.1.0.pre4)
4
+ omnievent-outlook (0.1.0.pre6)
5
5
  omnievent
6
6
  omnievent-api
7
7
 
@@ -24,15 +24,15 @@ GEM
24
24
  iso-639 (0.3.6)
25
25
  json (2.7.2)
26
26
  language_server-protocol (3.17.0.3)
27
- omnievent (0.1.0.pre5)
27
+ omnievent (0.1.0.pre7)
28
28
  hashie (>= 3.4.6)
29
29
  iso-639 (~> 0.3.5)
30
30
  tzinfo (~> 2.0)
31
- omnievent-api (0.1.0.pre3)
31
+ omnievent-api (0.1.0.pre4)
32
32
  excon
33
33
  omnievent
34
34
  parallel (1.26.3)
35
- parser (3.3.4.2)
35
+ parser (3.3.5.0)
36
36
  ast (~> 2.4.1)
37
37
  racc
38
38
  public_suffix (6.0.1)
@@ -40,38 +40,36 @@ GEM
40
40
  rainbow (3.1.1)
41
41
  rake (13.2.1)
42
42
  regexp_parser (2.9.2)
43
- rexml (3.3.6)
44
- strscan
43
+ rexml (3.3.7)
45
44
  rspec (3.13.0)
46
45
  rspec-core (~> 3.13.0)
47
46
  rspec-expectations (~> 3.13.0)
48
47
  rspec-mocks (~> 3.13.0)
49
48
  rspec-core (3.13.1)
50
49
  rspec-support (~> 3.13.0)
51
- rspec-expectations (3.13.2)
50
+ rspec-expectations (3.13.3)
52
51
  diff-lcs (>= 1.2.0, < 2.0)
53
52
  rspec-support (~> 3.13.0)
54
53
  rspec-mocks (3.13.1)
55
54
  diff-lcs (>= 1.2.0, < 2.0)
56
55
  rspec-support (~> 3.13.0)
57
56
  rspec-support (3.13.1)
58
- rubocop (1.66.0)
57
+ rubocop (1.66.1)
59
58
  json (~> 2.3)
60
59
  language_server-protocol (>= 3.17.0)
61
60
  parallel (~> 1.10)
62
61
  parser (>= 3.3.0.2)
63
62
  rainbow (>= 2.2.2, < 4.0)
64
63
  regexp_parser (>= 2.4, < 3.0)
65
- rubocop-ast (>= 1.32.1, < 2.0)
64
+ rubocop-ast (>= 1.32.2, < 2.0)
66
65
  ruby-progressbar (~> 1.7)
67
66
  unicode-display_width (>= 2.4.0, < 3.0)
68
- rubocop-ast (1.32.2)
67
+ rubocop-ast (1.32.3)
69
68
  parser (>= 3.3.1.0)
70
69
  ruby-progressbar (1.13.0)
71
- strscan (3.1.0)
72
70
  tzinfo (2.0.6)
73
71
  concurrent-ruby (~> 1.0)
74
- unicode-display_width (2.5.0)
72
+ unicode-display_width (2.6.0)
75
73
  webmock (3.23.1)
76
74
  addressable (>= 2.8.0)
77
75
  crack (>= 0.3.2)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniEvent
4
4
  module Outlook
5
- VERSION = "0.1.0.pre5"
5
+ VERSION = "0.1.0.pre7"
6
6
  end
7
7
  end
@@ -14,7 +14,9 @@ module OmniEvent
14
14
  API_VERSION = "v1.0"
15
15
 
16
16
  def raw_events
17
- response = perform_request(path: "#{request_path}/events")
17
+ response = perform_request(path: path_with_params("#{request_path}/events", list_params))
18
+ return [] unless response.is_a?(Hash) && response["value"]
19
+
18
20
  events = response["value"]
19
21
  next_link = response["@odata.nextLink"]
20
22
 
@@ -70,11 +72,10 @@ module OmniEvent
70
72
  event_id = options.event.metadata&.uid
71
73
  raise ArgumentError, "Event id is required." unless event_id
72
74
 
73
- response = perform_request(
75
+ perform_request(
74
76
  method: "DELETE",
75
77
  path: "#{request_path}/events/#{options.event.metadata.uid}"
76
78
  )
77
- response && !response["error"]
78
79
  end
79
80
 
80
81
  def event_hash(raw_event)
@@ -173,6 +174,22 @@ module OmniEvent
173
174
  "content": description
174
175
  }
175
176
  end
177
+
178
+ def list_params
179
+ @list_params ||= begin
180
+ params = {}
181
+ filter = ""
182
+ filter += "contains(subject, '#{options.match_name}')" if options.match_name
183
+ if options.from_time
184
+ filter += "#{filter.empty? ? "" : " and "}start/dateTime ge '#{Time.parse(options.from_time).utc.iso8601}'"
185
+ end
186
+ if options.to_time
187
+ filter += "#{filter.empty? ? "" : " and "}start/dateTime le '#{Time.parse(options.to_time).utc.iso8601}'"
188
+ end
189
+ params[:$filter] = filter unless filter.empty?
190
+ params
191
+ end
192
+ end
176
193
  end
177
194
  end
178
195
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnievent-outlook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre5
4
+ version: 0.1.0.pre7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omnievent