hypertrack 0.2.0 → 0.2.1

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: 13942950f4002fa7ea03d9902fe5244268a94114d93f799098f12121ef47076e
4
- data.tar.gz: 17ebb2fa453db480bdc57267d2caf6b2df3df80390c875bcb068802811657fca
3
+ metadata.gz: af70e2a0c4957cbcf8f8ca437702c5724b13a04a5f3f461844c3de21649c910c
4
+ data.tar.gz: 85cc6f93e2e639d757549d0b1f84cec6a3b731a587a0f032dd45e1feb8a03b21
5
5
  SHA512:
6
- metadata.gz: 8c64862c602baa347c6e9808037f674c2fc73caef1a889ef10fe1d8ae8ab79dc98b92649071e4b4523a2ad4704a7921661fbf33e115b052ca9f9e8aa90173510
7
- data.tar.gz: 30664a73153eff6cbe675309a71801ed9ad67956f9516f7628f40f3dc5f3e3140f24de98a3d3b403f554795bed78e4c26fec13780d06f88f66d861b575d06bc9
6
+ metadata.gz: f4a78e3a89dc9f904c121d677f0bdb89361e50e797276064f684e1bdd8312ffbc9c83593d5c091329a57496c781c8ecd0da06fcb0a418555f3209304c1c3ba3e
7
+ data.tar.gz: e0b56e7fc095502569b9daffc341d70277ab67afbc8314f39be826dba976d5152a344185cf6395bb18b8d352c4c339d80733db53fd10b51364ba7a4394e32ffc
@@ -12,8 +12,8 @@ module HyperTrack
12
12
  self.update(path, params)
13
13
  end
14
14
 
15
- def meter(params={})
16
- path = "meter/"
15
+ def mileage(params={})
16
+ path = "mileage/"
17
17
  self.get(path, params)
18
18
  end
19
19
  end
@@ -10,6 +10,12 @@ module HyperTrack
10
10
  end
11
11
  end
12
12
 
13
+ def get_list(path, params, required_params=[])
14
+ if HyperTrack::ParamsValidator.valid_args?(params, required_params, self.class::VALID_ATTRIBUTE_VALUES)
15
+ api_path = "#{self.class::API_BASE_PATH}#{self.id}/" + path
16
+ result = HyperTrack::ApiClient.fetch(api_path, params)
17
+ end
18
+ end
13
19
  end
14
20
  end
15
21
  end
@@ -11,6 +11,15 @@ module HyperTrack
11
11
  self.patch(params)
12
12
  end
13
13
 
14
+ def placeline(params={})
15
+ path = "placeline/"
16
+ self.get(path, params)
17
+ end
18
+
19
+ def mileage(params={})
20
+ path = "mileage/"
21
+ self.get(path, params)
22
+ end
14
23
  end
15
24
  end
16
25
  end
@@ -16,5 +16,14 @@ module HyperTrack
16
16
  }
17
17
  }
18
18
 
19
+ def self.placeline(filter_params={})
20
+ api_result = HyperTrack::ApiClient.fetch(get_class_name::API_BASE_PATH, filter_params)
21
+ api_result['results'].each_with_index do |opts, idx|
22
+ api_result['results'][idx] = get_class_name.new(opts['id'], opts)
23
+ end
24
+
25
+ api_result['results']
26
+ end
27
+
19
28
  end
20
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hypertrack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Utsav Kesharwani