judobase.schemas.Contest

pydantic model judobase.schemas.Contest

Represents the data about contest which provide the judobase api.

Show JSON schema
{
   "title": "Contest",
   "description": "Represents the data about contest which provide the judobase api.",
   "type": "object",
   "properties": {
      "id_competition": {
         "description": "The unique identifier for the competition.",
         "title": "Competition ID",
         "type": "string"
      },
      "id_fight": {
         "description": "The unique identifier for the fight.",
         "title": "Fight ID",
         "type": "string"
      },
      "id_person_blue": {
         "description": "The unique identifier for the blue competitor.",
         "title": "Blue Person ID",
         "type": "string"
      },
      "id_person_white": {
         "description": "The unique identifier for the white competitor.",
         "title": "White Person ID",
         "type": "string"
      },
      "id_winner": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The unique identifier for the winner.",
         "title": "Winner ID"
      },
      "is_finished": {
         "description": "Indicates if the contest is finished.",
         "title": "Is Finished",
         "type": "boolean"
      },
      "round": {
         "description": "The round number of the contest.",
         "title": "Round",
         "type": "integer"
      },
      "duration": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The duration of the contest.",
         "title": "Duration"
      },
      "gs": {
         "description": "Golden score.",
         "title": "GS",
         "type": "boolean"
      },
      "bye": {
         "description": "Indicates if a bye was applied in the contest.",
         "title": "Bye",
         "type": "string"
      },
      "fight_duration": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The duration of the fight.",
         "title": "Fight Duration"
      },
      "weight": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The weight category or weight value.",
         "title": "Weight"
      },
      "id_weight": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The identifier for the weight category.",
         "title": "Weight ID"
      },
      "type": {
         "description": "The type of contest.",
         "title": "Type",
         "type": "integer"
      },
      "round_code": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The code representing the round.",
         "title": "Round Code"
      },
      "round_name": {
         "description": "The name of the round.",
         "title": "Round Name",
         "type": "string"
      },
      "mat": {
         "description": "The mat number where the contest took place.",
         "title": "Mat",
         "type": "integer"
      },
      "date_start_ts": {
         "description": "The contest start timestamp.",
         "format": "date-time",
         "title": "Start Timestamp",
         "type": "string"
      },
      "updated_at": {
         "description": "The timestamp when the contest was last updated.",
         "format": "date-time",
         "title": "Updated At",
         "type": "string"
      },
      "first_hajime_at_ts": {
         "description": "The timestamp of the first hajime (start signal).",
         "format": "date-time",
         "title": "First Hajime Timestamp",
         "type": "string"
      },
      "ippon_w": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of ippon scored by the white competitor.",
         "title": "White Ippon"
      },
      "waza_w": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of waza-ari scored by the white competitor.",
         "title": "White Waza"
      },
      "yuko_w": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of yuko scored by the white competitor.",
         "title": "White Yuko"
      },
      "penalty_w": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of penalties incurred by the white competitor.",
         "title": "White Penalty"
      },
      "hsk_w": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "HSK score for the white competitor.",
         "title": "White HSK"
      },
      "person_white": {
         "description": "Name or identifier for the white competitor.",
         "title": "White Competitor",
         "type": "string"
      },
      "id_ijf_white": {
         "description": "The IJF ID for the white competitor.",
         "title": "White IJF ID",
         "type": "string"
      },
      "family_name_white": {
         "description": "Family name of the white competitor.",
         "title": "White Family Name",
         "type": "string"
      },
      "given_name_white": {
         "description": "Given name of the white competitor.",
         "title": "White Given Name",
         "type": "string"
      },
      "timestamp_version_white": {
         "description": "Timestamp version for the white competitor record.",
         "title": "White Timestamp Version",
         "type": "string"
      },
      "country_white": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Country of the white competitor.",
         "title": "White Country"
      },
      "country_short_white": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Short country code for the white competitor.",
         "title": "White Country Short"
      },
      "id_country_white": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Identifier for the white competitor's country.",
         "title": "White Country ID"
      },
      "picture_folder_1": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Folder path for the white competitor's picture.",
         "title": "White Picture Folder"
      },
      "picture_filename_1": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Filename for the white competitor's picture.",
         "title": "White Picture Filename"
      },
      "personal_picture_white": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "URL or path to the white competitor's personal picture.",
         "title": "White Personal Picture"
      },
      "ippon_b": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of ippon scored by the blue competitor.",
         "title": "Blue Ippon"
      },
      "waza_b": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of waza-ari scored by the blue competitor.",
         "title": "Blue Waza"
      },
      "yuko_b": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of yuko scored by the blue competitor.",
         "title": "Blue Yuko"
      },
      "penalty_b": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Number of penalties incurred by the blue competitor.",
         "title": "Blue Penalty"
      },
      "hsk_b": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "HSK score for the blue competitor.",
         "title": "Blue HSK"
      },
      "person_blue": {
         "description": "Name or identifier for the blue competitor.",
         "title": "Blue Competitor",
         "type": "string"
      },
      "id_ijf_blue": {
         "description": "The IJF ID for the blue competitor.",
         "title": "Blue IJF ID",
         "type": "string"
      },
      "family_name_blue": {
         "description": "Family name of the blue competitor.",
         "title": "Blue Family Name",
         "type": "string"
      },
      "given_name_blue": {
         "description": "Given name of the blue competitor.",
         "title": "Blue Given Name",
         "type": "string"
      },
      "timestamp_version_blue": {
         "description": "Timestamp version for the blue competitor record.",
         "title": "Blue Timestamp Version",
         "type": "string"
      },
      "country_blue": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Country of the blue competitor.",
         "title": "Blue Country"
      },
      "country_short_blue": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Short country code for the blue competitor.",
         "title": "Blue Country Short"
      },
      "id_country_blue": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Identifier for the blue competitor's country.",
         "title": "Blue Country ID"
      },
      "picture_folder_2": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Folder path for the blue competitor's picture.",
         "title": "Blue Picture Folder"
      },
      "picture_filename_2": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Filename for the blue competitor's picture.",
         "title": "Blue Picture Filename"
      },
      "personal_picture_blue": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "URL or path to the blue competitor's personal picture.",
         "title": "Blue Personal Picture"
      },
      "competition_name": {
         "description": "The name of the competition.",
         "title": "Competition Name",
         "type": "string"
      },
      "external_id": {
         "description": "The external identifier for the competition.",
         "title": "External ID",
         "type": "string"
      },
      "city": {
         "description": "City where the competition is held.",
         "title": "City",
         "type": "string"
      },
      "age": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Age category or related age information.",
         "title": "Age"
      },
      "rank_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Ranking name associated with the competition.",
         "title": "Rank Name"
      },
      "competition_date": {
         "description": "The date of the competition.",
         "title": "Competition Date",
         "type": "string"
      },
      "date_raw": {
         "description": "Raw date string of the competition.",
         "title": "Raw Date",
         "type": "string"
      },
      "comp_year": {
         "description": "The year of the competition.",
         "title": "Competition Year",
         "type": "string"
      },
      "tagged": {
         "description": "Tag indicator for the contest.",
         "title": "Tagged",
         "type": "integer"
      },
      "kodokan_tagged": {
         "description": "Kodokan tag indicator.",
         "title": "Kodokan Tagged",
         "type": "integer"
      },
      "published": {
         "description": "Publication status of the contest.",
         "title": "Published",
         "type": "string"
      },
      "sc_countdown_offset": {
         "description": "Offset for the countdown timer.",
         "title": "SC Countdown Offset",
         "type": "integer"
      },
      "fight_no": {
         "description": "The number of the fight within the contest.",
         "title": "Fight Number",
         "type": "integer"
      },
      "contest_code_long": {
         "description": "The long form of the contest code.",
         "title": "Contest Code Long",
         "type": "string"
      },
      "media": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Media details related to the contest.",
         "title": "Media"
      },
      "id_competition_teams": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Identifier for competition teams.",
         "title": "Competition Teams ID"
      },
      "id_fight_team": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Identifier for the fight team.",
         "title": "Fight Team ID"
      },
      "events": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/Event"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "contest events like score, osaekomi, shido, etc.",
         "title": "Contests events"
      }
   },
   "$defs": {
      "Event": {
         "description": "Represents the data about contest events by the Judobase API.\n\nEach event includes data about the time, participants, type of event,\nand tags that describe specific actions or referee decisions.\n\nProvided by the ``contest.fnd`` method of Judobase API with ``events`` in ``part`` param.",
         "properties": {
            "id_event": {
               "description": "The unique identifier for the event.",
               "title": "Event ID",
               "type": "string"
            },
            "contest_code_long": {
               "description": "The long contest code representing the event.",
               "title": "Contest Code",
               "type": "string"
            },
            "time_real": {
               "description": "The actual time in the match when the event occurred.",
               "title": "Real Time",
               "type": "number"
            },
            "time_sc": {
               "description": "The official match clock time at the event moment.",
               "title": "Sport Clock Time",
               "type": "number"
            },
            "tags": {
               "default": null,
               "description": "A list of tags describing the nature of the event.",
               "items": {
                  "$ref": "#/$defs/EventTag"
               },
               "title": "Tags",
               "type": "array"
            },
            "actors": {
               "default": null,
               "description": "A list of participants involved in the event.",
               "items": {
                  "$ref": "#/$defs/EventActor"
               },
               "title": "Actors",
               "type": "array"
            },
            "video_offset": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The time offset in the match video where the event appears.",
               "title": "Video Offset"
            },
            "rating": {
               "default": 0,
               "description": "A rating assigned to the event (if applicable).",
               "title": "Rating",
               "type": "integer"
            },
            "id_contest_event_type": {
               "description": "The identifier for the type of event that occurred.",
               "title": "Event Type ID",
               "type": "integer"
            },
            "public": {
               "default": true,
               "description": "Indicates if the event is publicly accessible.",
               "title": "Public",
               "type": "boolean"
            },
            "official": {
               "default": true,
               "description": "Indicates if the event is officially recognized.",
               "title": "Official",
               "type": "boolean"
            }
         },
         "required": [
            "id_event",
            "contest_code_long",
            "time_real",
            "time_sc",
            "id_contest_event_type"
         ],
         "title": "Event",
         "type": "object"
      },
      "EventActor": {
         "description": "Represents the data about event actors.",
         "properties": {
            "actor_type": {
               "description": "The actor type.",
               "title": "Actor Type",
               "type": "string"
            },
            "id_event": {
               "description": "The unique identifier for the event.",
               "title": "Event ID",
               "type": "string"
            },
            "id_actor": {
               "description": "The unique identifier for the tag actor.",
               "title": "Actor ID",
               "type": "string"
            },
            "family_name": {
               "description": "Family name of the competitor.",
               "title": "Family Name",
               "type": "string"
            },
            "given_name": {
               "description": "Given name of the competitor.",
               "title": "Given Name",
               "type": "string"
            },
            "id_person": {
               "description": "The unique identifier for the competitor.",
               "title": "Person ID",
               "type": "string"
            },
            "country_short": {
               "description": "Short country code for the competitor.",
               "title": "Country Short",
               "type": "string"
            }
         },
         "required": [
            "actor_type",
            "id_event",
            "id_actor",
            "family_name",
            "given_name",
            "id_person",
            "country_short"
         ],
         "title": "EventActor",
         "type": "object"
      },
      "EventTag": {
         "description": "Represents the data about event tags.",
         "properties": {
            "name": {
               "description": "The name of happened event.",
               "title": "Event name",
               "type": "string"
            },
            "id_tag": {
               "description": "The unique identifier for the tag.",
               "title": "Tag ID",
               "type": "string"
            },
            "id_event": {
               "description": "The unique identifier for the event.",
               "title": "Event ID",
               "type": "number"
            },
            "id_group": {
               "description": "The unique identifier for the tag main group.",
               "title": "Tag group ID",
               "type": "number"
            },
            "group_name": {
               "description": "The name of the tag main group.",
               "title": "Tag group name",
               "type": "string"
            },
            "code_short": {
               "description": "The short code for the tag.",
               "title": "Short Tag code",
               "type": "string"
            },
            "public": {
               "description": "Indicates if the tag is publicly available.",
               "title": "Public Available",
               "type": "integer"
            },
            "id_groups": {
               "description": "The unique identifier for the tag groups.",
               "title": "Tag groups id",
               "type": "string"
            }
         },
         "required": [
            "name",
            "id_tag",
            "id_event",
            "id_group",
            "group_name",
            "code_short",
            "public",
            "id_groups"
         ],
         "title": "EventTag",
         "type": "object"
      }
   },
   "required": [
      "id_competition",
      "id_fight",
      "id_person_blue",
      "id_person_white",
      "is_finished",
      "round",
      "gs",
      "bye",
      "type",
      "round_name",
      "mat",
      "date_start_ts",
      "updated_at",
      "first_hajime_at_ts",
      "person_white",
      "id_ijf_white",
      "family_name_white",
      "given_name_white",
      "timestamp_version_white",
      "person_blue",
      "id_ijf_blue",
      "family_name_blue",
      "given_name_blue",
      "timestamp_version_blue",
      "competition_name",
      "external_id",
      "city",
      "competition_date",
      "date_raw",
      "comp_year",
      "tagged",
      "kodokan_tagged",
      "published",
      "sc_countdown_offset",
      "fight_no",
      "contest_code_long"
   ]
}

Fields:
Validators:
field age: str | None = None

Age category or related age information.

field bye: str [Required]

Indicates if a bye was applied in the contest.

field city: str [Required]

City where the competition is held.

field comp_year: str [Required]

The year of the competition.

field competition_date: str [Required]

The date of the competition.

field competition_name: str [Required]

The name of the competition.

field contest_code_long: str [Required]

The long form of the contest code.

field country_blue: str | None = None

Country of the blue competitor.

field country_short_blue: str | None = None

Short country code for the blue competitor.

field country_short_white: str | None = None

Short country code for the white competitor.

field country_white: str | None = None

Country of the white competitor.

field date_raw: str [Required]

Raw date string of the competition.

field date_start_ts: datetime [Required]

The contest start timestamp.

Validated by:
field duration: str | None = None

The duration of the contest.

field events: list[Event] | None = None

contest events like score, osaekomi, shido, etc.

field external_id: str [Required]

The external identifier for the competition.

field family_name_blue: str [Required]

Family name of the blue competitor.

field family_name_white: str [Required]

Family name of the white competitor.

field fight_duration: str | None = None

The duration of the fight.

field fight_no: int [Required]

The number of the fight within the contest.

field first_hajime_at_ts: datetime [Required]

The timestamp of the first hajime (start signal).

Validated by:
field given_name_blue: str [Required]

Given name of the blue competitor.

field given_name_white: str [Required]

Given name of the white competitor.

field gs: bool [Required]

Golden score.

field hsk_b: int | None = None

HSK score for the blue competitor.

field hsk_w: int | None = None

HSK score for the white competitor.

field id_competition: str [Required]

The unique identifier for the competition.

field id_competition_teams: str | None = None

Identifier for competition teams.

field id_country_blue: str | None = None

Identifier for the blue competitor’s country.

field id_country_white: str | None = None

Identifier for the white competitor’s country.

field id_fight: str [Required]

The unique identifier for the fight.

field id_fight_team: str | None = None

Identifier for the fight team.

field id_ijf_blue: str [Required]

The IJF ID for the blue competitor.

field id_ijf_white: str [Required]

The IJF ID for the white competitor.

field id_person_blue: str [Required]

The unique identifier for the blue competitor.

field id_person_white: str [Required]

The unique identifier for the white competitor.

field id_weight: str | None = None

The identifier for the weight category.

field id_winner: str | None = None

The unique identifier for the winner.

field ippon_b: int | None = None

Number of ippon scored by the blue competitor.

field ippon_w: int | None = None

Number of ippon scored by the white competitor.

field is_finished: bool [Required]

Indicates if the contest is finished.

field kodokan_tagged: int [Required]

Kodokan tag indicator.

field mat: int [Required]

The mat number where the contest took place.

field media: str | None = None

Media details related to the contest.

field penalty_b: int | None = None

Number of penalties incurred by the blue competitor.

field penalty_w: int | None = None

Number of penalties incurred by the white competitor.

field person_blue: str [Required]

Name or identifier for the blue competitor.

field person_white: str [Required]

Name or identifier for the white competitor.

field personal_picture_blue: str | None = None

URL or path to the blue competitor’s personal picture.

field personal_picture_white: str | None = None

URL or path to the white competitor’s personal picture.

field picture_filename_1: str | None = None

Filename for the white competitor’s picture.

field picture_filename_2: str | None = None

Filename for the blue competitor’s picture.

field picture_folder_1: str | None = None

Folder path for the white competitor’s picture.

field picture_folder_2: str | None = None

Folder path for the blue competitor’s picture.

field published: str [Required]

Publication status of the contest.

field rank_name: str | None = None

Ranking name associated with the competition.

field round: int [Required]

The round number of the contest.

field round_code: str | None = None

The code representing the round.

field round_name: str [Required]

The name of the round.

field sc_countdown_offset: int [Required]

Offset for the countdown timer.

field tagged: int [Required]

Tag indicator for the contest.

field timestamp_version_blue: str [Required]

Timestamp version for the blue competitor record.

field timestamp_version_white: str [Required]

Timestamp version for the white competitor record.

field type: int [Required]

The type of contest.

field updated_at: datetime [Required]

The timestamp when the contest was last updated.

Validated by:
field waza_b: int | None = None

Number of waza-ari scored by the blue competitor.

field waza_w: int | None = None

Number of waza-ari scored by the white competitor.

field weight: str | None = None

The weight category or weight value.

field yuko_b: int | None = None

Number of yuko scored by the blue competitor.

field yuko_w: int | None = None

Number of yuko scored by the white competitor.

validator parse_date_start_ts  »  date_start_ts

Converts the date_start_ts field to a datetime object with UTC timezone.

validator parse_first_hajime_at_ts  »  first_hajime_at_ts

Converts the first_hajime_at_ts field to a datetime object with UTC timezone.

validator parse_updated_at  »  updated_at

Converts the updated_at field to a datetime object with UTC timezone.