与Ruby致电Amadeus API有点迷失。我需要解码结果吗?

发布于 2025-01-22 08:11:58 字数 602 浏览 3 评论 0原文

我是编码的初学者,并试图将其与Ruby一起使用。我正在尝试从此代码中获得人类可读的结果:


response = amadeus.reference_data.locations.points_of_interest.by_square.get(north: 41.397158, west: 2.160873, south: 41.394582, east: 2.177181)
  
  p response.body #=> The raw response, as a string
  p response.result #=> The body parsed as JSON, if the result was parsable
  p response.data #=> The list of locations, extracted from the JSON

我得到的是屏幕截图结果< /a>。我需要解码这个结果吗?

I'm a beginner at coding and trying to use this with Ruby. I'm trying to get human readable outcome from this code:


response = amadeus.reference_data.locations.points_of_interest.by_square.get(north: 41.397158, west: 2.160873, south: 41.394582, east: 2.177181)
  
  p response.body #=> The raw response, as a string
  p response.result #=> The body parsed as JSON, if the result was parsable
  p response.data #=> The list of locations, extracted from the JSON

and what I get is this as the screenshot result. Do I need to decode this result ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文