FantasyoMatic

FantasyoMatic · GPT Actions

FantasyoMatic API

FantasyoMatic API

  • POST /api/get-week-numbergetWeekNumber

    Will return the current week number and season of the NFL. Specifying a date will return the week number of that date.

  • POST /api/players-detailsplayerDetails

    Use this to show player images to the user in the player cards.

  • POST /api/players-listlistPlayers

    Returns a list of player details. Always call playerDetails with the id_nfl that is returned from this function after using this function.

  • POST /api/rankingsgetRankings

    Use this to get the rankings of the players of a position

  • POST /api/start-sitgetStartSit

    Use this to get the top and bottom performers for next week for each position. This is used to create a start/sit report.

原始 API 定义
{
  "components": {
    "schemas": {
      "GetWeekNumber": {
        "properties": {
          "date": {
            "description": "",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "PlayersIds": {
        "properties": {
          "players_ids": {
            "description": "comma separated list of player id_nfl",
            "type": "string"
          },
          "players_names": {
            "description": "comma separated list of player names",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      },
      "Rankings": {
        "properties": {
          "position": {
            "description": "player position. allowed values: qb,rb,wr,te,k,dst",
            "type": "string"
          }
        },
        "required": [
          "position"
        ],
        "type": "object"
      },
      "SearchPlayers": {
        "properties": {
          "orderBy": {
            "description": "allowed values: player_rating,matchup_rating,rest_of_season_rating,average_fantasy_points",
            "type": "string"
          },
          "players_ids": {
            "description": "array of player nfl_id",
            "type": "string"
          },
          "players_names": {
            "description": "comma separated list of player names",
            "type": "string"
          },
          "position": {
            "description": "allowed values: qb,rb,wr,te,k,dst",
            "type": "string"
          },
          "week_from": {
            "description": "week number or date to start the range for matchup_rating. Keep in mind that nfl weeks start on Tuesday.",
            "type": "string"
          },
          "week_to": {
            "description": "week number or date to end the range for matchup_rating. Keep in mind that nfl weeks start on Tuesday.",
            "type": "string"
          }
        },
        "required": [],
        "type": "object"
      }
    }
  },
  "openapi": "3.0.0",
  "paths": {
    "/api/get-week-number": {
      "post": {
        "description": "Will return the current week number and season of the NFL. Specifying a date will return the week number of that date.",
        "operationId": "getWeekNumber",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetWeekNumber"
              }
            }
          },
          "description": "",
          "required": true
        }
      }
    },
    "/api/players-details": {
      "post": {
        "description": "Use this to show player images to the user in the player cards.",
        "operationId": "playerDetails",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayersIds"
              }
            }
          },
          "description": "",
          "required": true
        }
      }
    },
    "/api/players-list": {
      "post": {
        "description": "Returns a list of player details. Always call playerDetails with the id_nfl that is returned from this function after using this function.",
        "operationId": "listPlayers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchPlayers"
              }
            }
          },
          "description": "",
          "required": true
        }
      }
    },
    "/api/rankings": {
      "post": {
        "description": "Use this to get the rankings of the players of a position",
        "operationId": "getRankings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rankings"
              }
            }
          },
          "description": "",
          "required": true
        }
      }
    },
    "/api/start-sit": {
      "post": {
        "description": "Use this to get the top and bottom performers for next week for each position. This is used to create a start/sit report.",
        "operationId": "getStartSit"
      }
    }
  },
  "servers": [
    {
      "url": "https://plugin.fantasyomatic.com"
    }
  ],
  "info": {
    "version": 1,
    "title": "FantasyoMatic API",
    "description": "FantasyoMatic API"
  }
}