Giter Club home page Giter Club logo

holvif1api's Introduction

F1 API Overview

API Route : /api/v1/

Description: Returns json object

Version

v1

Dependencies

  • Python 3
  • Packages
    • Flask==0.10.1
    • Flask-RESTful==0.3.1
    • Jinja2==2.7.3
    • MarkupSafe==0.23
    • Werkzeug==0.9.6
    • itsdangerous==0.24
    • six==1.9.0

Instruction

  • Clone the repo
  • Create virtualenv in the cloned project folder and name it :env as below
  • virtualenv env
  • Acitvate the virutal environment
  • source env/bin/activate
  • Install the dependencies
  • pip install -r requirements.txt
  • Run App
  • python app.py
  • Browse it by entering. E.G localhost:500/api/v1/races 'races' being endpoint name
  • For endpoints, follow the Path Definitions

Paths

Path Definitions

Description Path parameter Type
Drivers By Team Name /api/v1/drivers/< parameter > string
Drivers By Team Id /api/v1/drivers/< parameter > int
Drivers By Country /api/v1/driver_country/< parameter > string
Race By Number and Driver Standings of that specific race /api/v1/races/< parameter > int
Team Standings /api/v1/races/< parameter >/teamstandings int
Teams By Country /api/v1/teams/< parameter > string
Drivers List /api/v1/drivers None
Teams List /api/v1/teams None
All Races /api/v1/races None

Requests

POST /races

Description

Create new races object

Parameters

Type Name Description Schema Response Status
json races
required
New Race Races 200 Okay

GET /races

Type Name Description Schema Response Status
Query name
optional
Get All Races Races 200 Okay

GET /races/number

Type Name Description Schema Response Status
Query number
required
Specific Race results and Driver Standings int32 200 Okay

GET /races/number/team_standings

Type Name Description Schema Response Status
Query None
Team Standings by Race Number Races 200 Okay

GET /teams

Type Name Description Schema Response Status
Query None Team List Teams 200 Okay

GET /teams/country

Type Name Description Schema Response Status
Query country
required
Teams by country Teams,
string
200 Okay

GET /drivers

Type Name Description Schema Response Status
Query None Driver List DriverList 200 Okay

GET /drivers/id

Type Name Description Schema Response Status
Query id
required
Drivers by Team Id DriversByTeamId ,
int
200 Okay

GET driver_country/country

Type Name Description Schema Response Status
Query country
required
Drivers by Country Name DriverByCountry,string 200 Okay

GET /drivers/tname

Type Name Description Schema Response Status
Query tname
required
Driver By TeamName DriverByTeamName,
string
200 Okay

Datas in data Folder

Note :

#####Code could be better #####This was done with minimal experience with Flask and Flask Restful End Note - while(!(succeed == try()))

holvif1api's People

Contributors

horrormyth avatar

Stargazers

 avatar Kai Stullich avatar

Watchers

James Cloos 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.