iConji API & Tools

The iConji API serves as a base to create iConji applications. The two ingredients available as of now are the iConji characters and iConji messages. We are working on a set of tools in javascript to help display characters extracted from the iConji Messenger. The API returns XML responses.

To get an API Key:

  1. Create an iConji Messenger Account
  2. Visit the Settings tab
  3. Click on "Get an iConji API Key"

API Usage

To use the API, simply create an iConji account and create an API Key, this can be done on the settings page of the iConji Messenger.

iConji Characters

To retrieve every character and its metadata:
http://app.iconji.com/api/iconji_characters.xml?api_key=YOUR_API_KEY

To retrieve a specific character:
http://app.iconji.com/api/iconji_characters/1.xml?api_key=YOUR_API_KEY
We recommend caching this data locally for your usage.

Messages

The foundation of iConji is taking several characters and creating a message. Each character in the language has an encoded_id. A message is a string of encoded_id values separated by spaces. For example, the sentence "I love beer" would be represented by this string:

4x M 64

The strings are case sensitive, so 4x is not the same as 4X. If we used 4X, the sentence would read "Antelope love beer".

Characters in iConji messages have:

case "possessive": 
  return '!';
case "pastTense": 
	return '<';
case "futureTense": 
	return '>';
case "adjective": 
	return '_';
case "adverb": 
	return ';';
case "verb":
	return '`'; 
case "metadata":
	return '^';

To create an iConji Message:

curl -H "Accept: text/xml" -H "Content-type: application/xml" -d "<message><message>4x</message></message>" http://app.iconji.com/api/messages?api_key=YOUR_API_KEY

You can attach extra information to each character:

  • latitude
  • longitude
  • note
  • Position in message (0 indexed array based on the location of the first instance of metadata)

So for example to create a message with two characters, with meta data attached to the second character:

<message>
  <message>4x^</message>
  <metadatas_attributes>
    <0>
      <latitude>37.402</latitude>
      <longitude>-122.078</longitude>
      <note>TEST NOTE!</note>
    </0>
  </metadatas_attributes>
</message>
curl -H "Accept: text/xml" -H "Content-type: application/xml" -d "<message><message>4x^</message><metadatas_attributes><0><latitude>37.402</latitude><longitude>-122.078</longitude><note>TEST NOTE</note></0></metadatas_attributes></message>" http://app.iconji.com/api/messages?api_key=YOUR_API_KEY

To retrieve a specific message saved to the API:

http://app.iconji.com/api/messages/ID_OF_MESSAGE.xml?api_key=YOUR_API_KEY

You can only retrieve messages created by your API Key.