Git Product home page Git Product logo

school_digger's Introduction

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.

school_digger's People

Contributors

beneggett avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.