mobilize-america-client 0.3.3 → 0.3.4

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: 717c0ad893525935b9800e89de26164e720eda98841c1bf7cd7e9889ca329c09
4
- data.tar.gz: bab3343ffe0a46127ed52a5218a3e42788541b4f8f91c30710e87362dd379228
3
+ metadata.gz: 70f5bf5dfc9d0f511b818610c53141b895eb53ee95df849fc489ac291e042181
4
+ data.tar.gz: ad53e19f58d568c058f792d1e502ccfe189359aa24d73494e16beba95d6c69ee
5
5
  SHA512:
6
- metadata.gz: 86ac53f513539eea06ea0d658d14342733a8a98facbf4f8ba6dc82126a5296e4c584c7f85bdedc3cadfe33eed599548c5a80e2978432dedada36b678dbaff8d0
7
- data.tar.gz: 0510b730427d9145eca64bbbf6f560415ca45cc1b12f17b72c6e6bb389543b36d9729c97033651a56ffffcb4f9004b90882735e2e1378e73ff47de4d08d6e95d
6
+ metadata.gz: 92b5acafbc92e78cda5a536050632265c62173cdb5ea6e19692776ff4b4f127a71a2a1a12076b0ef8d671ff623c5cf66668f78ffeed431d59ef666bbe8311b5a
7
+ data.tar.gz: 21aa6d6616adb3fe6608f268f0b1ed70d799c5f7f78c64fb1f314ac829b05c2bec13fa72b74248f44ae624cec297e428ba1b9d3d7b841d069e120c9923f27e53
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -1,8 +1,8 @@
1
1
  module MobilizeAmericaClient
2
2
  class Client
3
3
  module Events
4
- def organization_events(organization_id:, updated_since: nil, max_distance_miles: nil, page: nil, per_page: nil,
5
- zipcode: nil)
4
+ def organization_events(organization_id:, timeslot_start: nil, timeslot_end: nil, updated_since: nil,
5
+ max_distance_miles: nil, page: nil, per_page: nil, zipcode: nil)
6
6
  params = {}
7
7
 
8
8
  unless page.nil?
@@ -13,6 +13,14 @@ module MobilizeAmericaClient
13
13
  params[:per_page] = per_page
14
14
  end
15
15
 
16
+ unless timeslot_start.nil?
17
+ params[:timeslot_start] = timeslot_start
18
+ end
19
+
20
+ unless timeslot_end.nil?
21
+ params[:timeslot_end] = timeslot_end
22
+ end
23
+
16
24
  unless updated_since.nil?
17
25
  params[:updated_since] = updated_since.to_i
18
26
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: mobilize-america-client 0.3.3 ruby lib
5
+ # stub: mobilize-america-client 0.3.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "mobilize-america-client".freeze
9
- s.version = "0.3.3"
9
+ s.version = "0.3.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Grey Moore".freeze]
14
- s.date = "2020-10-02"
14
+ s.date = "2020-10-13"
15
15
  s.email = "grey@controlshiftlabs.com".freeze
16
16
  s.executables = ["console".freeze, "setup".freeze]
17
17
  s.extra_rdoc_files = [
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
  ]
46
46
  s.homepage = "http://github.com/controlshift/mobilize_america_client".freeze
47
47
  s.licenses = ["MIT".freeze]
48
- s.rubygems_version = "3.0.8".freeze
48
+ s.rubygems_version = "3.0.3".freeze
49
49
  s.summary = "Client gem for the MobilizeAmerica API".freeze
50
50
 
51
51
  if s.respond_to? :specification_version then
@@ -23,6 +23,23 @@ RSpec.describe MobilizeAmericaClient::Client::Events do
23
23
  expect(subject.organization_events(organization_id: 'foo/bar')).to eq response
24
24
  end
25
25
 
26
+ it 'should support a timeslot_start parameter' do
27
+ timeslot_start = "gte_#{Time.new.to_i}"
28
+ stub_request(:get, events_url)
29
+ .with(headers: standard_headers, query: {timeslot_start: timeslot_start})
30
+ .to_return(body: response.to_json)
31
+ expect(subject.organization_events(organization_id: org_id, timeslot_start: timeslot_start)).to eq response
32
+ end
33
+
34
+ it 'should support a timeslot_end parameter' do
35
+ timeslot_end = "gte_#{Time.new.to_i}"
36
+ stub_request(:get, events_url)
37
+ .with(headers: standard_headers, query: {timeslot_end: timeslot_end})
38
+ .to_return(body: response.to_json)
39
+ expect(subject.organization_events(organization_id: org_id, timeslot_end: timeslot_end)).to eq response
40
+ end
41
+
42
+
26
43
  it 'should support an updated_since parameter' do
27
44
  updated_since = Time.new
28
45
  stub_request(:get, events_url)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilize-america-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grey Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  requirements: []
149
- rubygems_version: 3.0.8
149
+ rubygems_version: 3.0.3
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Client gem for the MobilizeAmerica API