Giter Site home page Giter Site logo

sport-import's Introduction

Sport Import

Sport Import is a basic JSON service which lets a user request JSON data for a baseball, football, or basketball. Data is being sourced from CBS Sports API, such as http://api.cbssports.com/fantasy/players/list?version=3.0&SPORT=baseball&response_format=JSON.

Setup

This is a typical Rails project, so clone this repo and run:

  • bundle install
  • rake db:migrate
  • rake data:import

This will set up the project and add data to the database. Run the server using:

  • bundle exec rails server

Run RSPEC tests via:

  • rspec

Usage

This is a JSON service, so you can request all data as JSON by visiting:

  • localhost/

You can search players using typical URL params, such as requesting all football quarterbacks:

  • localhost/?sport=football&position=qb

Design Plan

Basic Data Model

  • Create a Player model
  • Set up basic RSPEC tests

Data Import

  • rake data:import
  • add fields to Player models

JSON endpoint

  • get players/
    • return all data as JSON
  • get players/id
    • return player.to_json
  • Reevaluate RSPEC tests

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.