mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 10:14:11 +02:00
readme
This commit is contained in:
parent
880ac28b57
commit
684857a9d6
2 changed files with 32 additions and 3 deletions
29
api-server/README.md
Normal file
29
api-server/README.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# UGC API at home
|
||||
|
||||
Ugc api based on scraping the website
|
||||
|
||||
## Endpoints:
|
||||
|
||||
### `/player/:id`
|
||||
|
||||
Get player by steam id
|
||||
|
||||
### `/player/:id/history`
|
||||
|
||||
Get team history for player
|
||||
|
||||
### `/teams/:format`
|
||||
|
||||
Get teams by format (`9v9`, `6v6`, `4v4`, `2v2`)
|
||||
|
||||
### `/team/:id`
|
||||
|
||||
Get team info by id
|
||||
|
||||
### `/team/:id/roster`
|
||||
|
||||
Get team roster history
|
||||
|
||||
### `/team/:id/matches`
|
||||
|
||||
Get team match history
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
use axum::extract::{Path, State};
|
||||
use axum::http::StatusCode;
|
||||
use axum::response::{IntoResponse, Response};
|
||||
use axum::{response::Html, routing::get, Json, Router};
|
||||
use axum::{routing::get, Json, Router};
|
||||
use main_error::MainResult;
|
||||
use std::env::var;
|
||||
use std::net::SocketAddr;
|
||||
|
|
@ -75,8 +75,8 @@ async fn main() -> MainResult {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
async fn handler() -> Html<&'static str> {
|
||||
Html("<h1>Hello, World!</h1>")
|
||||
async fn handler() -> &'static str {
|
||||
include_str!("../README.md")
|
||||
}
|
||||
|
||||
#[instrument(skip(state))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue