0.0
Low commit activity in last 3 years
No release in over a year
Fully implements SchoolDigger API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 5.0
>= 0
~> 10.0
>= 0

Runtime

>= 0.14.0
 Project Readme

Gem Version Build Status Coverage Status

SchoolDigger

Fully Implements the SchoolDigger API in Ruby

Installation

Add this line to your application's Gemfile:

gem 'school_digger'

And then execute:

$ bundle

Or install it yourself as:

$ gem install school_digger

Be sure to define your SchoolDigger credentials by setting up environment variables in your application appropriately. Refer to the .env.sample file for details.

SCHOOL_DIGGER_APP_ID = 'my-id'
SCHOOL_DIGGER_APP_KEY = 'my-key'

Usage

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

Autocomplete

SchoolDigger::Api.new.autocomplete('San Die', st: "CA")

Search Districts

SchoolDigger::Api.new.districts('CA')
SchoolDigger::Api.new.schools('CA', q: "Los Angeles")

Find a District

SchoolDigger::Api.new.district("0600001")

Show District Rankings by State

SchoolDigger::Api.new.district_rankings('CA')

Search Schools

SchoolDigger::Api.new.schools('CA')
SchoolDigger::Api.new.schools('CA', q: "East High")

Find a School

SchoolDigger::Api.new.school("490003601072")

Show School Rankings by State

SchoolDigger::Api.new.school_rankings('CA')

Automatic pagination

There is a built in next_page method that will fetch the next page of results for any response

response = SchoolDigger::Api.new.districts('CA')
next_page_response = SchoolDigger::Api.new.next_page(response)

It is able to be used with any api here that supports standard paginate

Features

Implemented APIs from SchoolDigger API Docs

(Last updated on February 28, 2019)

API Description Implemented?
Autocomplete Returns a simple and quick list of schools for use in a client-typed autocomplete πŸ‘
Search Districts Returns a list of districts πŸ‘
Find District Returns a detailed record for one district πŸ‘
Search Schools Returns a list of schools πŸ‘
Find School Returns a detailed record for one school πŸ‘
School Rankings Returns a SchoolDigger School Rankings list πŸ‘
District Rankings Returns a SchoolDigger School Rankings list πŸ‘

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/beneggett/school_digger. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SchoolDigger project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.