Is a football API Server (language: Persian)
- Content
| |---------| |---------|
Request ---> | ---> | | --- Not Exists ---> | API |
| | | |---------|
| | Cache | |
| | | Result
| | | <------------------------|
| |---------| |
| | |
| Exists |
| | |
| <--------|-------------------------------|
Requirements
- Go (version 1.7 or above)
go install github.com/awolverp/kickcore@latest
KickCore API Documentation.
Note: {url} is the host that kickcore uses e.g. 'http://127.0.0.1:9090'
Search.
curl "{url}/api/search"
Query Params
Key | Value | Description |
---|---|---|
q | string | Search Query (q length must be > 4). |
Search (you can filter result).
curl "{url}/api/search/advanced"
Query Params
Key | Value | Description |
---|---|---|
q | string | Search Query (q length must be > 4). |
filter | integer | Filter result. zero means teams, 1 means players, 2 means coaches, 3 means competitions |
limit | integer | Optional. Result limit |
offset | integer | Optional. Result offset |
Get list of competitions which are supported.
curl "{url}/api/competitions-list"
Get weeks of a competition.
curl "{url}/api/competition/weeks"
Query Params
Key | Value | Description |
---|---|---|
id | string | Current ID of the competition |
Get standing table of a competition.
curl "{url}/api/competition/standing-table"
Query Params
Key | Value | Description |
---|---|---|
id | string | Current ID of the competition |
Get standing table of a competition.
curl "{url}/api/competition/matches/week"
Query Params
Key | Value | Description |
---|---|---|
id | string | Current ID of the competition |
n | integer | Week number |
Get match information.
curl "{url}/api/match/info"
Query Params
Key | Value | Description |
---|---|---|
id | string | Match ID |
Get matches by date.
curl "{url}/api/matches"
Query Params
Key | Value | Description |
---|---|---|
days | integer | Optional. Zero is today. 1 is tomorrow, 2 two days later, etc. (and you can pass nagative numbers). |
Get regions (and seasons) which have transfers.
curl "{url}/api/transfers/regions"
Get transfers of a season.
curl "{url}/api/transfers"
Query Params
Key | Value | Description |
---|---|---|
sid | string | seasion ID |
Get memory usage/stats of script.
curl "{url}/stats/mem"
Query Params
Key | Value | Description |
---|---|---|
unit | string | Optional. Is the unit byte (b or byte, kb or kilobyte, mb or megabyte). default is byte. |
What is extra_ttl.json file?
You can specify the expiration time (TTL) of each api with expire ttl file.
How to write? Each api has key that you can use it to specify expiration time.
- Advanced Search:
ADVANCED_SEARCH
- Competition Standing Table:
COMPETITION_STANDING_TABLE
- Competition Weeks:
COMEPTITION_WEEKS
- List of competitions:
COMPETITIONS_LIST
- Match info:
MATCH_INFO
- Matches:
MATCHES_BY_DATE
- Competitions match by week:
MATCHES_BY_WEEKNUMBER
- Transfers:
TRANSFERS
- Transfers Regions:
TRANSFERS_REGIONS
Other keys will ignored
What value can be set? Integer (means seconds) or
string (duration, see extra_ttl.json
file for examples)