API DOCUMENTATION


- Format
- METHOD: genre
- METHOD: recentlist
- METHOD: genrelist
- METHOD: question
- METHOD: user
- Error codes



Format


You can get xml or json format like this.

Sample Input:

http://quetter.com/api-1.0/xml/[parameters]

http://quetter.com/api-1.0/json/[parameters]

METHOD: http://quetter.com/api-1.0/[format]/genre


Get all genre every language.

Sample Input:

http://quetter.com/api-1.0/xml/genre/en
http://quetter.com/api-1.0/json/genre/ja

Fields to get

- language - en: English, -ja: Japanese

Sample response on XML:
<?xml version="1.0" encoding="UTF-8"?>
<quetter type="array">
 <item>
  <key>free</key>
  <name>Free Topic</genre_id>
 </item>
</quetter>

METHOD: http://quetter.com/api-1.0/[format]/genrelist


Get 20 newest questions total recently. If not input, lists all genres.

Sample Input:

http://quetter.com/api-1.0/xml/genrelist/business

http://quetter.com/api-1.0/json/genrelist

Sample response on XML:
<?xml version="1.0" encoding="UTF-8"?>
<quetter type="array">
 <item>
  <id>123456789</id>
  <url>http://quetter.com/question/123456789</url>
  <contents>What is Hollywood</contents>
  <created>2009-09-04T04:44:42+0000</created>
  <genre>free</genre>
  <user>
    <id>123456</id>
    <url>http://quetter.com/user/123456</url>
    <screen_name>example</screen_name>
    <profile_image_url>http://a1.twimg.com/profile_images/123456/example.jpg</profile_image_url>
  </user>
 </item>
</quetter>

METHOD: http://quetter.com/api-1.0/[format]/question


Get question and answers by unique question.

Sample Input:

http://quetter.com/api-1.0/xml/question/123456789

Sample response on XML:
<?xml version="1.0" encoding="UTF-8"?>
<quetter type="array">
 <question>
  <id>123456789</id>
  <url>http://quetter.com/question/123456789</id>
  <contents>What is Hollywood</contents>
  <created>2009-09-04T04:44:42+0000</created>
  <genre>business</genre>
  <user>
    <id>123456</id>
    <url>http://quetter.com/user/123456</url>
    <screen_name>example</screen_name>
    <profile_image_url>http://a1.twimg.com/profile_images/123456/example.jpg</profile_image_url>
  </user>
  <answer>
   <item>
    <id>987654321</id>
    <contents>Famous Movie Area</contents>
    <created>2009-09-04T04:44:42+0000</created>
    <user>
      <id>654321</id>
      <url>http://quetter.com/user/654321</url>
      <screen_name>sample</screen_name>
      <profile_image_url>http://a1.twimg.com/profile_images/123456/example.jpg</profile_image_url>
    </user>
    <thanks>
     <id>234567890</id>
     <contents>Thkans!</contents>
     <rating>4</rating>
     <created>2009-09-04T04:44:42+0000</created>
    </thanks>
   </item>
  </answer>
</question>
</quetter>

METHOD: http://quetter.com/api-1.0/[format]/user


Get question and answers by unique user.

Sample Input:

http://quetter.com/api-1.0/xml/user/example

Sample response on XML:
<?xml version="1.0" encoding="UTF-8"?>
<quetter type="array">
 <user>
  <id>123456</id>
  <url>http://quetter.com/user/123456</url>
  <screen_name>example</screen_name>
<profile_image_url>http://a1.twimg.com/profile_images/123456/example.jpg</profile_image_url> </user> <question>
<item> <id>123456789</id> <url>http://quetter.com/question/123456789</url> <genre>free</genre> <contents>What is Hollywood</contents> <created>2009-09-04T04:44:42+0000</created>
<item> </question>
<answer>
<item> <id>987654321</id> <question_id>235987521</question_id> <url>http://quetter.com/question/235987521</url> <contents>Famous Movie Area</contents> <created>2009-09-04T04:44:42+0000</created>
<item> </answer> </quetter>

Error codes


Sample error response on XML:
<?xml version="1.0" encoding="UTF-8"?>
<quetter type="array">
  <error>404</error>
</quetter>

Error codes and their descriptions:

400 - Bad Request - There was at least one error while trying to save your post. Errors are sent in plain text, one per line.
404 - Not Found - There wasn't item there.


ver 1.0 (2009/09/15)
ver 1.01 (2009/09/30)