Giter Site home page Giter Site logo

donors_choose_gem's Introduction

DonorsChoose

This is a lightweight gem for the Donors Choose Api. It's dead simple to use. Donors Choose requires an api key to make requests. You can get your api key by sending an email to them at apikey[at]donorschoose[dot]org. However, you can start using the gem right away as the Api provides a default key, which is already built into gem. So, if no api key passed as an agrument, the default is used.

Also, to use the gem, just link to this github repo as there is another Donors Choose gem and I am too lazy to change my name at the moment.

In Rails: gem donors_choose, github: "verdi327/donors_choose_gem"

Installation

Add this line to your application's Gemfile:

gem 'donors_choose'

And then execute:

$ bundle

Or install it yourself as:

$ gem install donors_choose

Usage

The gem has three external method to interact with. It will return an instance of the Project class.

Sample Call 1 (without own api key)

Sample Call 2

Other Methods

  • DonorsChooseApi::Project.find_by_id('811882', API_KEY) #=> returns a project object
  • @project.attributes #=> returns a hash of attributes

The Project class returns these attributes

  • :proposal_url
  • :fund_url
  • :image_url
  • :title
  • :short_description
  • :fulfillment_trailer
  • :percent_funded
  • :cost_to_complete
  • :total_price
  • :free_shipping
  • :teacher_name
  • :grade_level
  • :poverty_level
  • :school_name
  • :city
  • :zip
  • :state_abbr
  • :latitude
  • :longitude
  • :state
  • :subject
  • :resource_type
  • :expiration_date
  • :funding_status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

donors_choose_gem's People

Contributors

verdi327 avatar

Stargazers

 avatar

Watchers

 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.