A Rest API for CS:GO professional matches through match data gathered by HLTV.
GET /api/findall
GET /api/match/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of match to fetch |
GET /api/team/{name}
Parameter | Type | Description |
---|---|---|
name |
string |
Required. Name of team in match |
GET /api/comp/{name}
Parameter | Type | Description |
---|---|---|
name |
string |
Required. Name of tournament |
GET /api/type/{typename}
Parameter | Type | Description |
---|---|---|
typename |
string |
Required. Type of match(bo3,bo5) |
GET /api/top/{number}
Parameter | Type | Description |
---|---|---|
number |
int |
Required. # of matches you want? |
POST /admin/add/
Parameter | Type | Description |
---|---|---|
HltvMatch |
json String |
Required Match |
{
"teamA": "fnatic",
"teamB": "NIP",
"url": "https://hltv.org/results/",
"competition": "bo3",
"typeofmatch": "comp",
"scoreA": 2,
"scoreB": 1,
"matchid": 532323
}
The second aspect of this project is the web scraping script to gather all potential matches on hltv.org/results. Check the webscrape directory to properly view that code. More documentation/tests on the process in the near future.
- Base Functionality
- Full Match Search
- Advanced Match Breakdown
- Documentation Completion
- [] Automation
- Automated Web scraping for HLTV Match Data
- Connection to database to upload data
- [] Bug fix error regarding incomplete data for 2% of matches
- [] Server
- Physical server setup
- Port Existing SQL database to server
- [] Hosting for the api on server
- [] Potential Future
- [] Setup a Web App to interact with the match data
- [] Data Analysis on said CS: GO matches
- [] Make API public use/setup auth key
Check example configs folder for example MySql commands to replicate the database being used as well as a basic application.properties needed for the api to function. If you would like to run locally follow these instructions.
- First set up a mysql database, create a default empty table with the command listed in the example-configs.
- Next modify the apis application-properties providing springboot with the necessary configurations fielded with the username, password, and server IP.
- Then run the spring boot api making sure it is up and running.
- Next execute the web scraping script found in the web scrape folder make sure to specify the correct end point in the uploadToDb method.
- You can test if the database was properly populate using the sql command below or sending a get request to the api(see above for sample api requests).
select * from hltv_match;
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
For support, create a pull request(Recommended) or email jparkhurst120@gmail.com