school_digger 0.9.0 → 1.0.0

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: cdc63e25d6a7e09bad5986836812ac8d9b50f0bed660c3ae42211c0b66746115
4
- data.tar.gz: '0984596957ef0e4d0f4b4d0400efb778b35be1511a5a664ec4041f220eff172b'
3
+ metadata.gz: 29879c1b86289eca775977ea8d4d2cc7e0248c71f9c8a5cf6bbbeadeb5022d8e
4
+ data.tar.gz: 45fe6db3a6547cb3b1b8fc4852220e3f2c4b13e9980b9fbcd26dd3b821377247
5
5
  SHA512:
6
- metadata.gz: d737ea7ed92abe6060373b629e3d8a41eb729486921ca116163c41cb3a99c32acbf3230bcd642530d94ac724d79c4a8962781269175093f2ee401ab96c5c4640
7
- data.tar.gz: d1ce1fbc0348cf4fa55777ae4f9db04b566b914ec9895149afdb22e741b3ccd3e9c7e64daf3e99735e167daaf8cec01b72d3f91d71bf8e16db46c4ab6a1d5c67
6
+ metadata.gz: 8b074797ee53b90c459dc5a1aecea403d6b88d12d979ad64559555f534d5a6f021570e414cb3eda53b894d623e003a9077dc2e5b7694c69cce5aa49adb0488dc
7
+ data.tar.gz: ce3843937219e0d0591d9d8f7dc3268855c7611b04752156cccc9deaf2c42646893c0e388a88e6ce1130842ebe8336d9b1d6eb50d6e130ced0cd6d7281ab6fe1
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![Gem Version](https://badge.fury.io/rb/school_digger.svg)](https://badge.fury.io/rb/school_digger)
2
+ [![Build Status](https://travis-ci.com/beneggett/school_digger.svg?branch=master)](https://travis-ci.com/beneggett/school_digger)
3
+ [![Coverage Status](https://coveralls.io/repos/github/beneggett/school_digger/badge.svg?branch=master)](https://coveralls.io/github/beneggett/school_digger?branch=master)
1
4
  # SchoolDigger
2
5
 
3
6
  Fully Implements the SchoolDigger API in Ruby
@@ -18,6 +21,12 @@ Or install it yourself as:
18
21
 
19
22
  $ gem install school_digger
20
23
 
24
+ Be sure to define your SchoolDigger credentials by setting up environment variables in your application appropriately. Refer to the .env.sample file for details.
25
+ ```
26
+ SCHOOL_DIGGER_APP_ID = 'my-id'
27
+ SCHOOL_DIGGER_APP_KEY = 'my-key'
28
+ ```
29
+
21
30
  ## Usage
22
31
 
23
32
  There are 7 primary APIs that are wrapped. Below you will see basic examples of how to use them. For more information about what optional query parameters are available, please consult the [SchoolDigger API Docs](https://developer.schooldigger.com/docs#/)
@@ -60,10 +69,22 @@ SchoolDigger::Api.new.school("490003601072")
60
69
  SchoolDigger::Api.new.school_rankings('CA')
61
70
  ```
62
71
 
72
+ #### Automatic pagination
73
+ There is a built in `next_page` method that will fetch the next page of results for any response
74
+
75
+ ```
76
+ response = SchoolDigger::Api.new.districts('CA')
77
+ next_page_response = SchoolDigger::Api.new.next_page(response)
78
+ ```
79
+
80
+ It is able to be used with any api here that supports standard paginate
81
+
63
82
  ## Features
64
83
 
65
84
  Implemented APIs from [SchoolDigger API Docs](https://developer.schooldigger.com/docs#/)
66
85
 
86
+ (Last updated on February 28, 2019)
87
+
67
88
  | API | Description | Implemented? |
68
89
  | --- | --- | --- |
69
90
  | Autocomplete | Returns a simple and quick list of schools for use in a client-typed autocomplete | 👍 |
@@ -72,7 +72,7 @@ module SchoolDigger
72
72
  end
73
73
 
74
74
  ## response = SchoolDigger::Api.new.districts('CA')
75
- ## response = SchoolDigger::Api.new.next_page(response)
75
+ ## next_page_response = SchoolDigger::Api.new.next_page(response)
76
76
  def next_page(response)
77
77
  max_pages = response["numberOfPages"]
78
78
  original_query = response.request.options[:query]
@@ -1,3 +1,3 @@
1
1
  module SchoolDigger
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -36,12 +36,12 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "bundler", "~> 1.16"
37
37
  spec.add_development_dependency "rake", "~> 10.0"
38
38
  spec.add_development_dependency "minitest", "~> 5.0"
39
- # spec.add_development_dependency "vcr"
40
- # spec.add_development_dependency "webmock"
39
+ spec.add_development_dependency "vcr"
40
+ spec.add_development_dependency "webmock"
41
41
  spec.add_development_dependency "pry"
42
42
  # spec.add_development_dependency "guard"
43
43
  # spec.add_development_dependency "guard-minitest"
44
- # spec.add_development_dependency "coveralls"
44
+ spec.add_development_dependency "coveralls"
45
45
  spec.add_development_dependency "simplecov"
46
46
  spec.add_development_dependency "dotenv"
47
47
  spec.add_dependency "httparty", ">= 0.14.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: school_digger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-28 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: vcr
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: pry
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +94,20 @@ dependencies:
66
94
  - - ">="
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: coveralls
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: simplecov
71
113
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +171,7 @@ executables: []
129
171
  extensions: []
130
172
  extra_rdoc_files: []
131
173
  files:
174
+ - ".coveralls.yml"
132
175
  - ".env.sample"
133
176
  - ".gitignore"
134
177
  - ".travis.yml"