doufan6544 2014-03-19 10:44
浏览 27
已采纳

如何从json格式的basecamp经典api中获取数据

The data from BASECAMP api is in xml format so for some projects, people JSON format is working well.

But how to resolve this problem from basecamp classic api.

  1. I have googled and find that basecamp api is in xml format but i want data in json format .

  2. I am just trying to fetch data in JSON format , but error shown in browser: You may have typed the URL incorrectly

  3. In there api they have mentioned to fetch GET /GET /categories/#{id}.xml .

Here is my Code :

 $Comments=$client->fetch('https://basecamp.com/*****/api/v1/categories.json');
  • 写回答

1条回答 默认 最新

  • dpc57092 2014-03-19 12:09
    关注

    We have two versions of Basecamp, each with their own API. For Basecamp Classic, your account will look like https://subdomain.basecamphq.com, while for the new Basecamp, your url will be https://basecamp.com/1234567

    The Basecamp Classic API returns XML, and the docs are here. The new Basecamp API returns JSON, and the docs are here.

    To get all of the categories from the Classic API, you'll want to use

    https://#{subdomain}.basecamphq.com/projects/#{project_id}/categories.xml

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line