ff_api 0.1.1 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ff_api.rb +6 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 601131a4aa2b4ebf9302aea8b37082d4350cddd44060eeffa4d4d2504918ade1
4
- data.tar.gz: 95757f23e8f47488340ef5d7eb079a68bdc2f599c2baed70e070e3c75196e7c0
3
+ metadata.gz: c6780282b056826801351f8392c2d149dc2aabbe4a85fdd0d23c6a00e2ec206c
4
+ data.tar.gz: 88a4210fa2f4531567a8b1e9fa479499a8b1ac1330f7d29fb9829717c598e75c
5
5
  SHA512:
6
- metadata.gz: 77873c1de12e4d8c9de40d4a6db6fffe4a540865b40f637548472044b72f87673723850f612a34650aa36c198615c220a67aa7e2e08dcf62cb12916477638b89
7
- data.tar.gz: 702f98934970ed046303cafd9d7aa9bda64f64f8b35368e8cad58bec92ab107ee569d20f6534bf661ca230d54ffb4c150461d02b4d3d57574e45c03db2a7be4c
6
+ metadata.gz: efd15da2387a0721061517022a91ff5588153571f896b967de0d08413084b6da2f04ad748ce9837c55bff68d6a00e2e58e973348e419c39e0c80c3165edecbe1
7
+ data.tar.gz: 7678f2a45f25ffcee1339d7e2aa5f23d2ddc49c017194c4cb75c032600384b8e473b8dbb9edd6090383b5a75325b22798470dbdb5b8bbe8f944903850b100979
data/lib/ff_api.rb CHANGED
@@ -23,7 +23,8 @@ module FfApi
23
23
  request.headers["Authorization"] = "Bearer #{api_key}"
24
24
  end
25
25
  if response.status == 200
26
- schools = JSON.parse(response.body)
26
+ json = JSON.parse(response.body)
27
+ schools = json["results"]
27
28
  schools.map { |school_hash| FfApi::School.new(school_hash) }
28
29
  else
29
30
  respond_to_error(response)
@@ -47,8 +48,10 @@ module FfApi
47
48
  request.headers["Authorization"] = "Bearer #{api_key}"
48
49
  end
49
50
  if response.status == 200
50
- districts = JSON.parse(response.body)
51
- districts.map { |district_hash| FfApi::District.new(district_hash) }
51
+ json = JSON.parse(response.body)
52
+ districts = json["results"]
53
+ json["results"] = districts.map { |district_hash| FfApi::District.new(district_hash) }
54
+ json
52
55
  else
53
56
  respond_to_error(response)
54
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ff_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Cotant
@@ -32,7 +32,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: '0'
35
+ version: '3.0'
36
36
  required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="