🤼 Scrapes upcoming fights schedule and serves data in JSON format
About • Api Docs • Usage • Run Locally
⚒️REST API built with Typescript, Express, Cheerio.
Scrapes UFC Events pages to get every fight from each event and serves in its endpoints.
Example Request:
GET http://mmafightsscraperapi-env.eba-zihpvn2j.us-east-1.elasticbeanstalk.com/api/events
Response:
[ {
"_id": "...",
"title": "...",
"date": "...",
"event": "...",
"time": "...",
"url": ""
}, { ... } ]
Example Request:
GET http://mmafightsscraperapi-env.eba-zihpvn2j.us-east-1.elasticbeanstalk.com/api/event-card
Response:
[ {
"_id": '...',
"fights": [ {
"redCornerFighter": "...",
"blueCornerFighter": "..."
}. { ... } ],
}, { ... } ]
Example Request:
GET http://mmafightsscraperapi-env.eba-zihpvn2j.us-east-1.elasticbeanstalk.com/api/event-card/1
Response:
{
"_id": '...',
"fights": [ {
"redCornerFighter": "...",
"blueCornerFighter": "..."
}, { ... } ]
}
This project runs by default on http://localhost:3001
Fill the empty .env if using custom port.
Build containers and start server
# Install docker-compose if not already: "https://docs.docker.com/compose/install/"
# Clone repo
$ git clone https://github.com/matheuspor/mma-fights-scraper-api
# Build containers and start api
$ npm run compose:up
Run Test suite
$ npm run test
Run Test coverage
$ npm run test:coverage