QuizChannel

From Triangle Wiki

Jump to: navigation, search

Contents

API Overview

The API consists of a set of callable methods, and some API endpoints.

To perform an action using the API, you need to select a calling convention, send a request to its endpoint specifying a method and some arguments, and you will receive a formatted response.

All request formats, take a list of named parameters.

  • The REQUIRED parameter method is used to specify the calling method.
  • The REQUIRED parameter api_key is used to specify your API Key.
  • The optional parameter format is used to specify a response format.

API Key

Each and every request to the API needs to be signed with a Unique API key. API keys can be requested from http://www.quizchannel.com/api

Request Formats

  • Currently this API only supports REST

REST is the simplest request format to use - it's a simple HTTP GET or POST action.

The REST Endpoint URL is http://api.quizchannel.com/api/

By default, REST requests will send a REST response.

Response Formats

REST is the simplest response format to use - it's a simple XML block.

To return the response in REST format, send a parameter "format" in the request with a value of "rest". When using the REST request method, the response defaults to REST.

A method call returns this:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <rsp stat="ok">
  3. [xml-payload-here]
  4. </rsp>

If an error occurs, the following is returned:

  1. <rest generator="zend" version="1.0">
  2. <response>
  3. <message>An unknown error occured. Please try again.</message>
  4. </response>
  5. <status>failed</status>
  6. </rest>

Encoding

The API expects all data to be UTF-8 encoded.

External Links

Personal tools