【问题标题】:Confused about YQL Fantasy Query对 YQL Fantasy Query 感到困惑
【发布时间】:2016-05-30 07:52:33
【问题描述】:

我希望使用 Yahoo Fantasy API 来获取上一赛季球员的赛季数据(得分、篮板、助攻等)。我正在试验他们的 YQL,但我在尝试理解如何使用它时遇到了麻烦。例如:

```select * from fantasysports.players.stats where league_key='238.l.627060' and player_key='238.p.6619'```

给出的输出:

{
 "query": {
  "count": 1,
  "created": "2016-05-30T07:46:12Z",
  "lang": "en-US",
  "diagnostics": {
   "publiclyCallable": "true",
   "url": {
    "execution-start-time": "2",
    "execution-stop-time": "1643",
    "execution-time": "1641",
    "content": "http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=238.l.627060/players;player_keys=238.p.6619/stats"
   },
   "javascript": {
    "execution-start-time": "0",
    "execution-stop-time": "1645",
    "execution-time": "1644",
    "instructions-used": "257",
    "table-name": "fantasysports.players.stats"
   },
   "user-time": "1646",
   "service-time": "1641",
   "build-version": "0.2.998"
  },
  "results": {
   "player": {
    "player_key": "238.p.6619",
    "player_id": "6619",
    "name": {
     "full": "Albert Pujols",
     "first": "Albert",
     "last": "Pujols",
     "ascii_first": "Albert",
     "ascii_last": "Pujols"
    },
    "editorial_player_key": "mlb.p.6619",
    "editorial_team_key": "mlb.t.3",
    "editorial_team_full_name": "Los Angeles Angels",
    "editorial_team_abbr": "LAA",
    "uniform_number": "5",
    "display_position": "1B",
    "headshot": {
     "url": "http://l.yimg.com/iu/api/res/1.2/tEqcQTL99PN5L26BdMaRiA--/YXBwaWQ9c2hhcmVkO2NoPTIzMzY7Y3I9MTtjdz0xNzkwO2R4PTg1NztkeT0wO2ZpPXVsY3JvcDtoPTYwO3E9MTAwO3c9NDY-/https://s.yimg.com/xe/i/us/sp/v/mlb_cutout/players_l/20160401/6619.png",
     "size": "small"
    },
    "image_url": "http://l.yimg.com/iu/api/res/1.2/tEqcQTL99PN5L26BdMaRiA--/YXBwaWQ9c2hhcmVkO2NoPTIzMzY7Y3I9MTtjdz0xNzkwO2R4PTg1NztkeT0wO2ZpPXVsY3JvcDtoPTYwO3E9MTAwO3c9NDY-/https://s.yimg.com/xe/i/us/sp/v/mlb_cutout/players_l/20160401/6619.png",
    "is_undroppable": "0",
    "position_type": "B",
    "eligible_positions": {
     "position": [
      "1B",
      "Util"
     ]
    },
    "has_player_notes": "1",
    "player_stats": {
     "coverage_type": "season",
     "season": "2010",
     "stats": {
      "stat": [
       {
        "stat_id": "60",
        "value": "183/587"
       },
       {
        "stat_id": "7",
        "value": "115"
       },
       {
        "stat_id": "12",
        "value": "42"
       },
       {
        "stat_id": "13",
        "value": "118"
       },
       {
        "stat_id": "16",
        "value": "14"
       },
       {
        "stat_id": "3",
        "value": ".312"
       }
      ]
     }
    }
   }
  }
 }
}

而我尝试过使用其他选项但没有运气。关于如何使用这个以 JSON 格式获取玩家统计数据的任何想法?

【问题讨论】:

    标签: json yql yahoo-api json-api


    【解决方案1】:

    尝试将stats_type='season'stats_season='2015' 添加到您的查询中。

    【讨论】:

    • 你有想过这个吗?
    猜你喜欢
    • 1970-01-01
    • 2019-09-13
    • 2012-07-22
    • 2013-05-13
    • 2020-04-16
    • 2023-03-08
    • 2019-08-04
    • 2019-12-30
    • 2022-01-20
    相关资源
    最近更新 更多