Introduction

Работайте над официальным приложением Altaihockey для iOS и Android с помощью REST API.

С введением интеграции REST API в Altaihockey 1.0 мы получили известия от растущего числа пользователей, которые просили мобильное приложение. С помощью приложения команды смогут уведомлять своих болельщиков о предстоящих матчах, последних результатах и ​​актуальной таблице.

  • Events — /wp-json/sportspress/v2/events
  • Teams — /wp-json/sportspress/v2/teams
  • Players — /wp-json/sportspress/v2/players
  • Staff — /wp-json/sportspress/v2/staff
  • Calendars — /wp-json/sportspress/v2/calendars
  • League Tables — /wp-json/sportspress/v2/tables
  • Player Lists — /wp-json/sportspress/v2/lists

Events Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the event.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
venues
array
The terms assigned to the object in the venue taxonomy.
Context: view, edit
teams
array
The ids for the teams participating in the event.
Context: view, edit, embed
main_results
array
The main results of the event.
Context: view, embed
outcome
array
The outcome of the event.
Context: viewembed
winner
integer
The id for the winning team.
Context: viewembed
minutes
integer
The full time of the event in minutes.
Context: view, edit, embed
players
array
The ids for the players participating in the event.
Context: view, edit
staff
array
The ids for the staff members participating in the event.
Context: view, edit
results
array
The full results table for each team.
Context: view, edit
performance
array
The full player performance table for each team.
Context: view, edit

Teams Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the event.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
parent
integer
The id for the parent of the object.
Context:  viewedit
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
menu_order
integer
The order of the object in relation to other objects of its type.
Context: view, edit
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
venues
array
The terms assigned to the object in the venue taxonomy.
Context: view, edit
staff
array
The ids for the staff members that belong to the team.
Context: view, edit
tables
array
The ids for the league tables that belong to the team.
Context: view, edit
lists
array
The ids for the player lists that belong to the team.
Context: viewedit
events
array
The ids for the latest and upcoming events that the team participates in.
Context: view
abbreviation
string
The abbreviation for the team.
Context: view, edit, embed
url
string, uri
URL to the team’s external site.
Context:  vieweditembed

Calendars Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the event.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
format
string
The format for the calendar.
Context:  viewedit
One of:  calendarlistblocks
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
venues
array
The terms assigned to the object in the venue taxonomy.
Context: view, edit
data
array
The full calendar data containing event objects.
Context: view

League Tables Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the event.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
menu_order
integer
The order of the object in relation to other objects of its type.
Context: view, edit
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
data
array
The full league table data.
Context:  viewedit

Players Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the event.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
menu_order
integer
The order of the object in relation to other object of its type.
Context: view, edit
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
positions
array
The terms assigned to the object in the position taxonomy.
Context: view, edit
number
integer
The player’s squad number.
Context:  vieweditembed
teams
array
The ids for the teams that the player belongs to.
Context: view, edit
current_teams
array
The ids for the player’s current teams.
Context: view, edit
past_teams
array
The ids for the player’s past teams.
Context: viewedit
nationalities
array
The 3-letter country codes for the player’s nationalities.
Context:  vieweditembed
metrics
array
The player’s metrics.
Context: view, edit
statistics
array
The player’s statistics by league and season.
Context:  viewedit

Player Lists Schema

date
string, datetime (ISO8601)
The date the object was published, in the site’s timezone.
Context: view, edit, embed
date_gmt
string, datetime (ISO8601)
The date the object was published, as GMT.
Context: view, edit
guid
object
The globally unique identifier for the object.
Read only
Context: view, edit
id
integer
Unique identifier for the object.
Read only
Context: view, edit, embed
link
string, uri
URL to the object.
Read only
Context: view, edit, embed
modified
string, datetime (ISO8601)
The date the object was last modified, in the site’s timezone.
Read only
Context: view, edit
modified_gmt
string, datetime (ISO8601)
The date the object was last modified, as GMT.
Read only
Context: view, edit
password
string
A password to protect access to the player list.
Context:  edit
slug
string
An alphanumeric identifier for the object unique to its type.
Context: view, edit, embed
status
string
A named status for the object.
Context:  edit
One of: publish, future, draft, pending, private
title
object
The title for the object.
Context: view, edit, embed
content
object
The content for the object.
Context: view, edit
author
integer
The id for the author of the object.
Context: view, edit, embed
excerpt
object
The excerpt for the object.
Context: view, edit, embed
featured_media
integer
The id of the featured media for the object.
Context: view, edit
comment_status
string
Whether or not comments are open on the object.
Context: view, edit
One of:  openclosed
ping_status
string
Whether or not the object can be pinged.
Context: view, edit
One of:  openclosed
format
string
The format for the player list.
Context:  viewedit
One of:  listgallery
leagues
array
The terms assigned to the object in the league taxonomy.
Context: view, edit
seasons
array
The terms assigned to the object in the season taxonomy.
Context: view, edit
positions
array
The terms assigned to the object in the position taxonomy.
Context: view, edit
data
array
The full player list data.
Context:  viewedit