lj_test_api 0.1.2 → 0.1.3
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/lj_test_api.rb +24 -1
- data/lib/lj_test_api/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: 294f0a6f7f259e0122b7ccf7a6ff7bee9dd9fe80
|
4
|
+
data.tar.gz: 11d19c8b30065264f3770186ef464d51bdef4ef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69d059528c0b7d14f77ec9cd3d27e339db7f18563238258ed788d8b952042231bad00c43be69ff756336d9dde2a797e9d2d032c1f6f543ef77823d7eff60edda
|
7
|
+
data.tar.gz: e3e633e095928a0b1a8aaf9663bfe4e84878e252aee38cc6fdf4f3207e6a3b8250b4aa2918002fea4d5a6317b85cec248faa542b569b04c8cf09163ed67a4fb5
|
data/lib/lj_test_api.rb
CHANGED
@@ -6,8 +6,31 @@ module LjTestApi
|
|
6
6
|
class ApiCall
|
7
7
|
def self.url(api_endpoint)
|
8
8
|
data = Unirest.get("#{api_endpoint}").body
|
9
|
-
|
9
|
+
|
10
|
+
# json.array! data.each do |object|
|
11
|
+
# json.department object["department"]
|
12
|
+
# json.employee_annual_salary object["employee_annual_salary"]
|
13
|
+
# json.job_titles object["job_titles"]
|
14
|
+
# json.name object["name"]
|
15
|
+
# end
|
16
|
+
data.each do |object|
|
17
|
+
return :json => object
|
18
|
+
end
|
10
19
|
end
|
20
|
+
# json.first_name employee.first_name
|
21
|
+
# json.last_name employee.last_name
|
22
|
+
# json.full_name employee.full_name
|
23
|
+
# json.birthdate employee.birthdate
|
24
|
+
# json.email employee.email
|
25
|
+
# json.ssn employee.ssn
|
26
|
+
|
27
|
+
|
28
|
+
# {"department"=>"POLICE",
|
29
|
+
# "employee_annual_salary"=>"129096.00",
|
30
|
+
# "job_titles"=>"ASST GENERAL COUNSEL",
|
31
|
+
# "name"=>"BAZAREK, WILLIAM E"}
|
32
|
+
|
33
|
+
|
11
34
|
|
12
35
|
# def self.department(parameter)
|
13
36
|
# bulk_data = Unirest.get("https://data.cityofchicago.org/resource/tt4n-kn4t.json?department=#{parameter.upcase}").body
|
data/lib/lj_test_api/version.rb
CHANGED