1

I'm tasked to design a new API for our infrastructure. Some of the things I'd like to do is:

  • implement oauth for authentication
  • good xml-based structure, adapting ATOM, GEO-RSS and other xml schema standards where applicable.
  • JSON output

Some of the things I've been thinking about is applying REST. In practice I find it's not as easy to grasp as a more 'method, argument, result'-RPC model.

Especially since there's no simple CRUD-model, but about 250 distinct operations it doesn't make a lot of sense for me.

Some of the things I'm wondering, is how I should create a good mapping between JSON-format and namespaced XML format. If this doesn't work intuitively, I'll manually map all the data-types.

So basically, I'm wondering what you think, and if you have any examples of API's that were complex, but easy to use.

In case you were wondering, SOAP is out of the question.

4

1 回答 1

1

英国报纸卫报有一个优秀的(新的)API。它很大,有许多客户端库,并且有一个非常好的API 浏览器——它在你的浏览器中用作一个拆分窗格,并带有一个实时控制台来玩 API。

于 2009-04-28T20:49:56.280 回答