my name's ryan and I hate programming...
rrickgauer / api.mlb-data Goto Github PK
View Code? Open in Web Editor NEWRestful API for MLB data
Home Page: https://api.mlb-data.ryanrickgauer.com/main.php
License: MIT License
Restful API for MLB data
Home Page: https://api.mlb-data.ryanrickgauer.com/main.php
License: MIT License
my name's ryan and I hate programming...
/pitching?filter=HR:>:50,GS:=:100
Translates to
WHERE HR > 50 AND GS = 100
ERA = (9 * ER) / IP
Instead of returning the seasonal stats for each module, add the option to sum all stats
batting?aggregate=true
Instead of calling each function, I can use the call_user_func().
See the People.setDataSetSize()
for a reference.
Add a column in people that shows whether or not they are in the hall of fame
/search/people?q='jon'
/search/players?q='jon'
/search/managers?q='jon'
/search/teams?q='Cubs'
the sort parameter should be /module?sort=+HR,-GS,+R
Should include per page and pagination
For pitching, batting, and appearances modules add option to sum all data using people/playerID/batting?total=true
/people
, then return all rows using pagination.page
pagination
section that gives:
first
- the first page in the dataset: /people?page=1
next
- the next page in the dataset: /people?page=13
last
- the last page in the dataset: /people?page=19
sub classes include:
like api.github.com
I can just use the parser calls to get the data
I am using the same function for aggregates and non aggregates. Because of this, the pagination is wrong for aggregate modules.
images
playerID
is specified, return only the image links for that playerReturns the module stats for only that player.
Filter, sort, and aggregate parameters still work the same here.
Example: /batting/playerID
Display the modules/endpoints for the default display api.mlb-data.php
Add aggregates to each one
people/playerID
- biographicalpeople/playerID/salaries
- salary infopeople/playerID/batting
- batting statspeople/playerID/pitching
- pitching statspeople/playerID/appearances
- appearancespeople/playerID/schools
- schools attendedfunctions.php
renamed to DB-Functions.php
api-functions.php
renamed to API-Functions.php`Create a new user that has only read/select statement privileges
Keep the main user for local testing
For instance, sometimes it returns yearID, other times it returns year.
Also, for team names, return teamName
?page=1
ceil(count(dataSet) / perPage)
They are all null
These are the requirements I want to include before releasing the first version.
Check if requested sort/filter parameters are included in the related module's constants array.
If not, return 400 header response
sort=HR:desc&filter=HR:>:47,SO:=:215
people/playerID should give a list of that player's colleges
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.