Categorygithub.com/awolverp/kickcore
modulepackage
0.0.0-20230330124336-0464d78b2bfd
Repository: https://github.com/awolverp/kickcore.git
Documentation: pkg.go.dev

# README

KickCore

Is a football API Server (language: Persian)

Copyright - Changelog


How It Works?

             |      |---------|                     |---------|
Request ---> | ---> |         | --- Not Exists ---> |   API   |
             |      |         |                     |---------|
             |      |  Cache  |                          |
             |      |         |                        Result
             |      |         | <------------------------|
             |      |---------|                          |
             |           |                               |
             |         Exists                            |
             |           |                               |
             |  <--------|-------------------------------|

Install

Build From Source

Requirements

  • Go (version 1.7 or above)
go install github.com/awolverp/kickcore@latest

API

KickCore API Documentation.

Note: {url} is the host that kickcore uses e.g. 'http://127.0.0.1:9090'

Search

Search.

curl "{url}/api/search"

Query Params

KeyValueDescription
qstringSearch Query (q length must be > 4).

Adavnced Search

Search (you can filter result).

curl "{url}/api/search/advanced"

Query Params

KeyValueDescription
qstringSearch Query (q length must be > 4).
filterintegerFilter result. zero means teams, 1 means players, 2 means coaches, 3 means competitions
limitintegerOptional. Result limit
offsetintegerOptional. Result offset

List of competitions

Get list of competitions which are supported.

curl "{url}/api/competitions-list"

Weeks of competition

Get weeks of a competition.

curl "{url}/api/competition/weeks"

Query Params

KeyValueDescription
idstringCurrent ID of the competition

Competition Standing Table

Get standing table of a competition.

curl "{url}/api/competition/standing-table"

Query Params

KeyValueDescription
idstringCurrent ID of the competition

Competition Matches by week

Get standing table of a competition.

curl "{url}/api/competition/matches/week"

Query Params

KeyValueDescription
idstringCurrent ID of the competition
nintegerWeek number

Match info

Get match information.

curl "{url}/api/match/info"

Query Params

KeyValueDescription
idstringMatch ID

Matches

Get matches by date.

curl "{url}/api/matches"

Query Params

KeyValueDescription
daysintegerOptional. Zero is today. 1 is tomorrow, 2 two days later, etc. (and you can pass nagative numbers).

Transfers Regions

Get regions (and seasons) which have transfers.

curl "{url}/api/transfers/regions"

Transfers

Get transfers of a season.

curl "{url}/api/transfers"

Query Params

KeyValueDescription
sidstringseasion ID

Memory Stats (Developer API)

Get memory usage/stats of script.

curl "{url}/stats/mem"

Query Params

KeyValueDescription
unitstringOptional. Is the unit byte (b or byte, kb or kilobyte, mb or megabyte). default is byte.

Questions

How to write expire ttl file?

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.

Keys

  • 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)

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author