Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

All custom endpoints made for the Page / Play integration are served under api/sp/...

Schedules

GET api/sp/schedules

Returns all schedules that have at least one team or at least one game based off an office, season and category (optional).

For an office which have a game office type (League, Tournament, or Cup), only schedules that are directly under the office are queried. For all other types of office, it returns all schedules that have teams under the office and the effective offices (excluding office members).

Accepts

  • officeId (required)

  • seasonId (required)

  • categoryId (optional)

Returns

  • Schedules

Categories

GET api/sp/categories

Returns all categories that contain schedules with at least one team or at least one game based off an office and season.

For an office which have a game office type (League, Tournament, or Cup), only schedules that are directly under the office are queried. For all other types of office, it returns all schedules that have teams under the office and the effective offices (excluding office members).

Accepts

  • officeId (required)

  • seasonId (required)

Returns

  • Categories, includes Class and Division

Seasons

GET api/sp/seasons

Returns all seasons that Play currently supports. Additional information such as the SID id (externalId), display name (name), first / last game date (firstGameDate / lastGameDate), and if its the current season (isCurrent). The categoryId filter is used to narrow down the first and last game date.

For an office which have a game office type (League, Tournament, or Cup), only games that are directly under the office are queried. For all other types of office, it returns all games that have teams under the office and the effective offices (excluding office members).

Accepts

  • officeId (required)

  • categoryId (optional)

Returns

  • Seasons

    [
    	{
    		"seasonId": "2024-25",
    		"name": "2024-25",
    		"externalId": "daa35de9-a983-11ee-bfcd-02d1437f326a",
    		"firstGameDate": "2024-04-13",
    		"lastGameDate": "2024-09-28",
    		"isCurrent": true
    	},
    	{
    		"seasonId": "2023-24",
    		"name": "2023-24",
    		"externalId": "56a3ed23-96b0-11ed-aabf-026841454e5e",
    		"firstGameDate": "2023-05-03",
    		"lastGameDate": "2024-04-24",
    		"isCurrent": false
    	},
    	{
    		"seasonId": "2022-23",
    		"name": "2022-23",
    		"externalId": null,
    		"firstGameDate": null,
    		"lastGameDate": null,
    		"isCurrent": false
    	},
    	{
    		"seasonId": "2021-22",
    		"name": "2021-22",
    		"externalId": null,
    		"firstGameDate": null,
    		"lastGameDate": null,
    		"isCurrent": false
    	},
    	{
    		"seasonId": "2020-21",
    		"name": "2020-21",
    		"externalId": null,
    		"firstGameDate": null,
    		"lastGameDate": null,
    		"isCurrent": false
    	},
    	{
    		"seasonId": "2019-20",
    		"name": "2019-20",
    		"externalId": null,
    		"firstGameDate": null,
    		"lastGameDate": null,
    		"isCurrent": false
    	},
    	{
    		"seasonId": "2018-19",
    		"name": "2018-19",
    		"externalId": null,
    		"firstGameDate": null,
    		"lastGameDate": null,
    		"isCurrent": false
    	}
    ]

Events (Work in progress)

GET api/sp/events or GET api/sp/calendar

Goal is for Spordle Page to be able to display a calendar with all the events that are happening within an office or a schedule.

Games: For offices of type League, Tournament, Cup it will grab all games directly in the office. For all other type of offices (Non-game offices) it will find all the teams that are within the office and the games associated to those teams. Ex. in an Association, games from a team that is in the association that played in a random tournament will show up.

Practices: All practices within the office.

A practice record has an array of teams as opposed to 2 teams and can have no teams. (teamIds: [])

Activities: All activities within the office.

Activities are always linked to a team. (teamId: 1). The location of an activity is free flow text, not an address, ex. “Gymnase école secondaire Des Chutes”. An activity can have one of these 4 types: Training, Meeting, Meal, Accomodation. We do not have i18n set up for this resource, meaning the location or name they put in will show up in the language they wrote it in.

All types of events can have one of the following status: Active Cancelled, Conflict, Postponed, Rescheduled, Rink Changed

Questions:

  • For, let say, an association, would you want to see games from a tournament that is outside the association but teams from the association are participating?

  • Is the calendar going to be shown just at the office level or is it also going to be shown at the schedule level?

Reponse

games: [{
  "number": "M18-517",
  "date": "2022-11-11",
  "startTime": "2022-11-11T21:30:00.000Z",
  "endTime": "2022-11-11T23:00:00.000Z",
  "timezone": "America/Vancouver",
  "division": "U18",
  "gender": "Integrated",
  "categoryId": "37cd78a9-662e-4dac-be18-8ec715692c53",
  "seasonId": "2023-24",
  "arenaId": 128,
  "scheduleId": 4801,
  "groupId": null,
  "crossGroupId": null,
  "crossScheduleId": null,
  "officeId": 661,
  "homeTeamId": 17426,
  "awayTeamId": 20414,
  "status": "Active",
  "comments": null,
  "isApproved": true,
  "isCertified": false,
  "id": 128984,
  "category": "C"
}...],
practices: [{
  "id": "7f69e234-a131-4f0a-a9da-24bc14d5d3cc",
  "name": "Practice - OTTAWA MYERS AUTOMOTIVE U14 AAA",
  "teamIds": [],
  "arenaId": 9209,
  "comments": null,
  "date": "2024-02-21",
  "startTime": "2024-02-21T14:00:00.000Z",
  "endTime": "2024-02-21T15:30:00.000Z",
  "officeId": 4695,
  "seasonId": "2024-25",
  "status": "Active",
  "timezone": "America/Toronto"
}...],
activites: [{
    "id": "e01a2a6b-ab8d-4d6b-9892-86b990ead88b",
    "teamId": 52422,
    "type": "Training",
    "name": "Dryland",
    "date": "2024-02-13",
    "startTime": "2024-02-13T22:30:00.000Z",
    "endTime": "2024-02-13T23:30:00.000Z",
    "timezone": "America/Vancouver",
    "location": "Semiahmoo Athletic Club",
    "status": "Active",
    "comments": null,
    "parentId": null
}]
  • No labels