No Losses

No Losses · GPT 작업

russianWarship.RIP API documentation

  • GET /war-infoGet all information about current state of war.

    Endpoint for selecting war start and end dates, current day from start date and latest status.

  • GET /war-info/statusGet information about status of war.

    Endpoint for selecting latest information about status of war.

  • GET /war-info/status/{lang}Get information about status of war with description.

    Endpoint for selecting latest information about status of war with translated description.

  • GET /statisticsGet information about all available statistical records.

    Endpoint for selecting information about all statistical records.

  • GET /statistics/{date}Get information about the available statistical record.

    Endpoint for selecting a statistical record by date.

  • GET /statistics/latestGet information about the latest statistical record.

    Endpoint for selecting information about the most recent statistical record.

  • GET /terms/{lang}Get information for all statistical terms.

    Endpoint for selecting information about statistical terms.

  • GET /terms/{lang}/{term}Get basic information about the available statistical term.

    Endpoint for selecting information about statistical term.

원본 API 스키마
{
  "openapi": "3.0.3",
  "info": {
    "title": "russianWarship.RIP API documentation",
    "version": "v2"
  },
  "servers": [
    {
      "url": "https://russianwarship.rip/api/v2"
    }
  ],
  "paths": {
    "/war-info": {
      "get": {
        "tags": [
          "WarInfo"
        ],
        "summary": "Get all information about current state of war.",
        "description": "Endpoint for selecting war start and end dates, current day from start date and latest status.",
        "operationId": "getWarInfo",
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "properties": {
                        "date_start": {
                          "type": "string",
                          "schema_format": "date",
                          "example": "2022-02-24"
                        },
                        "date_end": {
                          "type": "string",
                          "schema_format": "date"
                        },
                        "current_day": {
                          "type": "integer",
                          "schema_format": "int32",
                          "example": 1
                        },
                        "current_date": {
                          "type": "string",
                          "schema_format": "date",
                          "example": "2022-02-24"
                        },
                        "war_status": {
                          "ref": "#/components/schemas/WarStatusObject"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/war-info/status": {
      "get": {
        "tags": [
          "WarInfo"
        ],
        "summary": "Get information about status of war.",
        "description": "Endpoint for selecting latest information about status of war.",
        "operationId": "getWarStatus",
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/WarStatusObject"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/war-info/status/{lang}": {
      "get": {
        "tags": [
          "WarInfo"
        ],
        "summary": "Get information about status of war with description.",
        "description": "Endpoint for selecting latest information about status of war with translated description.",
        "operationId": "getWarStatusInfo",
        "parameters": [
          {
            "name": "lang",
            "param_in": "path",
            "description": "Translate description in response to the selected language.",
            "required": true,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "enum": [
                "en",
                "ua"
              ],
              "example": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/WarStatusTranslatedObject"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/statistics": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "summary": "Get information about all available statistical records.",
        "description": "Endpoint for selecting information about all statistical records.",
        "operationId": "getAllStatistics",
        "parameters": [
          {
            "name": "offset",
            "param_in": "query",
            "description": "The number of items to skip before starting to collect the result set. The value cannot be equal to or greater than total records.",
            "required": false,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "integer",
              "minimum": 0,
              "schema_format": "int64",
              "default": 0,
              "example": 0
            }
          },
          {
            "name": "limit",
            "param_in": "query",
            "description": "The numbers of items to return.",
            "required": false,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "schema_format": "int64",
              "default": 50,
              "example": 50
            }
          },
          {
            "name": "date_from",
            "param_in": "query",
            "description": "Date string in \"YYYY-MM-DD\" format, reflecting the day of war. Filter to get records from the date.",
            "required": false,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "schema_format": "date",
              "example": "2022-02-24"
            }
          },
          {
            "name": "date_to",
            "param_in": "query",
            "description": "Date string in \"YYYY-MM-DD\" format, reflecting the day of war. Filter to get records before the date. The value cannot be less than the \"date_from\" attribute if passed.",
            "required": false,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "schema_format": "date",
              "example": "2022-03-01"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "headers": {
              "X-Total-Count": {
                "name": "",
                "param_in": "header",
                "description": "The total number of records.",
                "required": false,
                "deprecated": false,
                "allowEmptyValue": false,
                "explode": false,
                "allowReserved": false,
                "param_schema": {
                  "type": "integer",
                  "schema_format": "int64",
                  "example": 60
                }
              }
            },
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/StatisticsData"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "422": {
            "description": "Failed operation.",
            "headers": {
              "X-Total-Count": {
                "name": "",
                "param_in": "header",
                "description": "The total number of records.",
                "required": false,
                "deprecated": false,
                "allowEmptyValue": false,
                "explode": false,
                "allowReserved": false,
                "param_schema": {
                  "type": "integer",
                  "example": 60
                }
              }
            },
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "example": {
                        "offset": "The offset may not be greater than 60.",
                        "limit": "The limit may not be greater than 50.",
                        "date_to": "The date to must be a date after or equal to date from."
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/statistics/{date}": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "summary": "Get information about the available statistical record.",
        "description": "Endpoint for selecting a statistical record by date.",
        "operationId": "getStatisticByDate",
        "parameters": [
          {
            "name": "date",
            "param_in": "path",
            "description": "Date string in \"YYYY-MM-DD\" format, reflecting the day of war.",
            "required": true,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "schema_format": "date",
              "example": "2022-04-14"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/StatisticsObject"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "422": {
            "description": "Failed operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "example": {
                        "date": "Out of range."
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/statistics/latest": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "summary": "Get information about the latest statistical record.",
        "description": "Endpoint for selecting information about the most recent statistical record.",
        "operationId": "getLatestStatistics",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/StatisticsObject"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/terms/{lang}": {
      "get": {
        "tags": [
          "Terms"
        ],
        "summary": "Get information for all statistical terms.",
        "description": "Endpoint for selecting information about statistical terms.",
        "operationId": "getAllStatisticalTerms",
        "parameters": [
          {
            "name": "lang",
            "param_in": "path",
            "description": "Translate statistics fields titles in response to the selected language.",
            "required": true,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "enum": [
                "en",
                "ua"
              ],
              "example": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "type": "object",
                      "example": {
                        "personnel_units": {
                          "title": "Personnel units",
                          "icon": "https://russianwarship.rip/images/icons/icon-people.svg"
                        },
                        "tanks": {
                          "title": "Tanks",
                          "icon": "https://russianwarship.rip/images/icons/icon-tank.svg"
                        },
                        "armoured_fighting_vehicles": {
                          "title": "Armoured fighting vehicles",
                          "icon": "https://russianwarship.rip/images/icons/icon-bbm.svg"
                        },
                        "artillery_systems": {
                          "title": "Artillery systems",
                          "icon": "https://russianwarship.rip/images/icons/icon-art.svg"
                        },
                        "mlrs": {
                          "title": "Multiple Launch Rocket System",
                          "icon": "https://russianwarship.rip/images/icons/icon-rszv.svg"
                        },
                        "aa_warfare_systems": {
                          "title": "Anti-aircraft warfare systems",
                          "icon": "https://russianwarship.rip/images/icons/icon-ppo.svg"
                        },
                        "planes": {
                          "title": "Planes",
                          "icon": "https://russianwarship.rip/images/icons/icon-plane.svg"
                        },
                        "helicopters": {
                          "title": "Helicopters",
                          "icon": "https://russianwarship.rip/images/icons/icon-helicopter.svg"
                        },
                        "vehicles_fuel_tanks": {
                          "title": "Vehicles and fuel tanks",
                          "icon": "https://russianwarship.rip/images/icons/icon-auto.svg"
                        },
                        "warships_cutters": {
                          "title": "Warships and cutters",
                          "icon": "https://russianwarship.rip/images/icons/icon-ship.svg"
                        },
                        "cruise_missiles": {
                          "title": "Cruise missiles",
                          "icon": "https://russianwarship.rip/images/icons/icon-rocket.svg"
                        },
                        "uav_systems": {
                          "title": "Unmanned aerial vehicle systems",
                          "icon": "https://russianwarship.rip/images/icons/icon-bpla.svg"
                        },
                        "special_military_equip": {
                          "title": "Special military equipment",
                          "icon": "https://russianwarship.rip/images/icons/icon-special.svg"
                        },
                        "atgm_srbm_systems": {
                          "title": "Anti-tank guided missile and short-range ballistic missile systems",
                          "icon": "https://russianwarship.rip/images/icons/icon-trk.svg"
                        },
                        "submarines": {
                          "title": "Submarines",
                          "icon": "https://russianwarship.rip/images/icons/icon-submarine.svg"
                        }
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/terms/{lang}/{term}": {
      "get": {
        "tags": [
          "Terms"
        ],
        "summary": "Get basic information about the available statistical term.",
        "description": "Endpoint for selecting information about statistical term.",
        "operationId": "getStatisticalTerm",
        "parameters": [
          {
            "name": "lang",
            "param_in": "path",
            "description": "Translate statistics fields titles in response to the selected language.",
            "required": true,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "enum": [
                "en",
                "ua"
              ],
              "example": "en"
            }
          },
          {
            "name": "term",
            "param_in": "path",
            "description": "Name of statistics term.",
            "required": true,
            "deprecated": false,
            "allowEmptyValue": false,
            "explode": false,
            "allowReserved": false,
            "param_schema": {
              "type": "string",
              "enum": [
                "personnel_units",
                "tanks",
                "armoured_fighting_vehicles",
                "artillery_systems",
                "mlrs",
                "aa_warfare_systems",
                "planes",
                "helicopters",
                "vehicles_fuel_tanks",
                "warships_cutters",
                "cruise_missiles",
                "uav_systems",
                "special_military_equip",
                "atgm_srbm_systems",
                "submarines"
              ],
              "example": "tanks"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "media_type_schema": {
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The data were fetched successfully."
                    },
                    "data": {
                      "ref": "#/components/schemas/TermObject"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "EmptySuccessResponse": {
        "properties": {
          "message": {
            "type": "string",
            "example": "Success message."
          },
          "data": {
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "message",
          "data"
        ]
      },
      "EmptyFailureResponse": {
        "properties": {
          "message": {
            "type": "string",
            "example": "Error message."
          },
          "errors": {
            "type": "object"
          }
        },
        "type": "object",
        "required": [
          "message",
          "errors"
        ]
      },
      "StatisticsData": {
        "properties": {
          "records": {
            "items": {
              "ref": "#/components/schemas/StatisticsObject"
            },
            "type": "array"
          },
          "paging": {
            "ref": "#/components/schemas/PagingObject"
          }
        },
        "type": "object",
        "required": [
          "records",
          "paging"
        ]
      },
      "TermsData": {
        "properties": {
          "personnel_units": {
            "ref": "#/components/schemas/TermObject"
          },
          "tanks": {
            "ref": "#/components/schemas/TermObject"
          },
          "armoured_fighting_vehicles": {
            "ref": "#/components/schemas/TermObject"
          },
          "artillery_systems": {
            "ref": "#/components/schemas/TermObject"
          },
          "mlrs": {
            "ref": "#/components/schemas/TermObject"
          },
          "aa_warfare_systems": {
            "ref": "#/components/schemas/TermObject"
          },
          "planes": {
            "ref": "#/components/schemas/TermObject"
          },
          "helicopters": {
            "ref": "#/components/schemas/TermObject"
          },
          "vehicles_fuel_tanks": {
            "ref": "#/components/schemas/TermObject"
          },
          "warships_cutters": {
            "ref": "#/components/schemas/TermObject"
          },
          "cruise_missiles": {
            "ref": "#/components/schemas/TermObject"
          },
          "uav_systems": {
            "ref": "#/components/schemas/TermObject"
          },
          "special_military_equip": {
            "ref": "#/components/schemas/TermObject"
          },
          "atgm_srbm_systems": {
            "ref": "#/components/schemas/TermObject"
          },
          "submarines": {
            "ref": "#/components/schemas/TermObject"
          }
        },
        "type": "object",
        "required": [
          "personnel_units",
          "tanks",
          "armoured_fighting_vehicles",
          "artillery_systems",
          "mlrs",
          "aa_warfare_systems",
          "planes",
          "helicopters",
          "vehicles_fuel_tanks",
          "warships_cutters",
          "cruise_missiles",
          "uav_systems",
          "special_military_equip",
          "atgm_srbm_systems",
          "submarines"
        ]
      },
      "StatisticsObject": {
        "properties": {
          "date": {
            "type": "string",
            "schema_format": "date",
            "example": "2022-04-14"
          },
          "day": {
            "type": "integer",
            "schema_format": "int64",
            "example": 50
          },
          "resource": {
            "type": "string",
            "schema_format": "url",
            "example": "https://www.facebook.com/MinistryofDefence.UA/posts/295952562717203"
          },
          "war_status": {
            "ref": "#/components/schemas/WarStatusObject"
          },
          "stats": {
            "ref": "#/components/schemas/StatsObject"
          },
          "increase": {
            "ref": "#/components/schemas/IncreaseObject"
          }
        },
        "type": "object",
        "required": [
          "date",
          "day",
          "resource",
          "war_status",
          "stats"
        ]
      },
      "PagingObject": {
        "properties": {
          "next_url": {
            "type": "string",
            "schema_format": "url",
            "example": "https://russianwarship.rip/api/v2/statistics?offset=50&limit=1"
          },
          "prev_url": {
            "type": "string",
            "schema_format": "url",
            "example": "https://russianwarship.rip/api/v2/statistics?offset=48&limit=1"
          },
          "first_url": {
            "type": "string",
            "schema_format": "url",
            "example": "https://russianwarship.rip/api/v2/statistics?offset=0&limit=1"
          },
          "last_url": {
            "type": "string",
            "schema_format": "url",
            "example": "https://russianwarship.rip/api/v2/statistics?offset=59&limit=1"
          }
        },
        "type": "object",
        "required": [
          "next_url",
          "prev_url",
          "first_url",
          "last_url"
        ]
      },
      "StatsObject": {
        "properties": {
          "personnel_units": {
            "type": "integer",
            "schema_format": "int64",
            "example": 19900
          },
          "tanks": {
            "type": "integer",
            "schema_format": "int64",
            "example": 753
          },
          "armoured_fighting_vehicles": {
            "type": "integer",
            "schema_format": "int64",
            "example": 1968
          },
          "artillery_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 366
          },
          "mlrs": {
            "type": "integer",
            "schema_format": "int64",
            "example": 122
          },
          "aa_warfare_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 64
          },
          "planes": {
            "type": "integer",
            "schema_format": "int64",
            "example": 160
          },
          "helicopters": {
            "type": "integer",
            "schema_format": "int64",
            "example": 144
          },
          "vehicles_fuel_tanks": {
            "type": "integer",
            "schema_format": "int64",
            "example": 1437
          },
          "warships_cutters": {
            "type": "integer",
            "schema_format": "int64",
            "example": 7
          },
          "cruise_missiles": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "uav_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 134
          },
          "special_military_equip": {
            "type": "integer",
            "schema_format": "int64",
            "example": 25
          },
          "atgm_srbm_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 4
          },
          "submarines": {
            "type": "integer",
            "schema_format": "int32",
            "example": 0
          }
        },
        "type": "object",
        "required": [
          "personnel_units",
          "tanks",
          "armoured_fighting_vehicles",
          "artillery_systems",
          "mlrs",
          "aa_warfare_systems",
          "planes",
          "helicopters",
          "vehicles_fuel_tanks",
          "warships_cutters",
          "cruise_missiles",
          "uav_systems",
          "special_military_equip",
          "atgm_srbm_systems",
          "submarines"
        ]
      },
      "IncreaseObject": {
        "properties": {
          "personnel_units": {
            "type": "integer",
            "schema_format": "int64",
            "example": 100
          },
          "tanks": {
            "type": "integer",
            "schema_format": "int64",
            "example": 14
          },
          "armoured_fighting_vehicles": {
            "type": "integer",
            "schema_format": "int64",
            "example": 4
          },
          "artillery_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 8
          },
          "mlrs": {
            "type": "integer",
            "schema_format": "int64",
            "example": 7
          },
          "aa_warfare_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "planes": {
            "type": "integer",
            "schema_format": "int64",
            "example": 2
          },
          "helicopters": {
            "type": "integer",
            "schema_format": "int64",
            "example": 1
          },
          "vehicles_fuel_tanks": {
            "type": "integer",
            "schema_format": "int64",
            "example": 8
          },
          "warships_cutters": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "cruise_missiles": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "uav_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 2
          },
          "special_military_equip": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "atgm_srbm_systems": {
            "type": "integer",
            "schema_format": "int64",
            "example": 0
          },
          "submarines": {
            "type": "integer",
            "schema_format": "int32",
            "example": 0
          }
        },
        "type": "object",
        "required": [
          "personnel_units",
          "tanks",
          "armoured_fighting_vehicles",
          "artillery_systems",
          "mlrs",
          "aa_warfare_systems",
          "planes",
          "helicopters",
          "vehicles_fuel_tanks",
          "warships_cutters",
          "cruise_missiles",
          "uav_systems",
          "special_military_equip",
          "atgm_srbm_systems",
          "submarines"
        ]
      },
      "TermObject": {
        "properties": {
          "title": {
            "type": "string",
            "example": "Tanks"
          },
          "icon": {
            "type": "string",
            "schema_format": "url",
            "example": "https://russianwarship.rip/images/icons/icon-tank.svg"
          }
        },
        "type": "object",
        "required": [
          "title",
          "icon"
        ]
      },
      "WarStatusObject": {
        "properties": {
          "code": {
            "type": "integer",
            "maximum": 3,
            "minimum": 1,
            "schema_format": "int32",
            "example": 1
          },
          "alias": {
            "type": "string",
            "enum": [
              "in_progress",
              "armistice",
              "ukraine_won"
            ],
            "example": "in_progress"
          }
        },
        "type": "object",
        "required": [
          "code",
          "alias"
        ]
      },
      "WarStatusTranslatedObject": {
        "properties": {
          "war_status": {
            "ref": "#/components/schemas/WarStatusObject"
          },
          "description": {
            "type": "string",
            "example": "The war is going on"
          },
          "lang": {
            "type": "string",
            "enum": [
              "en",
              "ua"
            ],
            "example": "en"
          }
        },
        "type": "object",
        "required": [
          "war_status",
          "description"
        ]
      }
    }
  }
}