Documentation

Authentication

Login Credentials

There is currently one set of credentials accepted for API usage

pal_name + player_key
You can get your player key from MoiPal, once you've logged in go to Settings -> Player Key.

How to use it

For any of the urls on the site you can add your login credentials to the request by including

http://www.moipal.com/xml/?name=$pal_name&pkey=$player_key
If you are posting please remember to include them in the post arguments instead of in the url. The Pal's name is case-insensitive.

XML response

The xml is in a proprietary format that looks a bit like this:
<data>
   <pal id="8">
      <name>Joakim</name>
      <action>Pal at home</action>
      <icon>
      http://www.moipal.com/mp_res/pal_preview/icon_8_joakim.png
      </icon>
      <stats>
         <happiness>60</happiness>
         <inspiration>14</inspiration>
         <condition>61</condition>
         <knowledge>14</knowledge>
         <sociality>12</sociality>
      </stats>
   </pal>
   
   <images>
      <image url="http://www.moipal.com:8080/dev/8/walk_up.png">
         <frame offset="28" center="14" />
         <frame offset="28" center="14" />
         <frame offset="28" center="14" />
         <frame offset="28" center="14" />
         <frame offset="28" center="14" />
      </image>
      <image url="http://www.moipal.com:8080/dev/8/walk_down.png">
         <frame offset="27" center="11" />
         <frame offset="27" center="11" />
         <frame offset="38" center="19" />
         <frame offset="27" center="11" />
         <frame offset="38" center="19" />
      </image>
      <image url="http://www.moipal.com:8080/dev/8/walk_right.png">
         <frame offset="27" center="15" />
         <frame offset="27" center="15" />
         <frame offset="38" center="18" />
         <frame offset="27" center="15" />
         <frame offset="38" center="18" />
      </image>
      <image url="http://www.moipal.com:8080/dev/8/walk_left.png">
         <frame offset="27" center="14" />
         <frame offset="27" center="14" />
         <frame offset="27" center="14" />
         <frame offset="27" center="14" />
         <frame offset="27" center="14" />
      </image>
   </images>
</data>

The images

There are five different images that can be accessed:
# Used for just showing the Pal's face
<icon>http://www.moipal.com/mp_res/pal_preview/icon_8_joakim.png</icon>
# Used for animating the walk up
<image url="http://www.moipal.com:8080/dev/8/walk_up.png">
# Used for animating the walk down
<image url="http://www.moipal.com:8080/dev/8/walk_down.png">
# Used for animating the walk left
<image url="http://www.moipal.com:8080/dev/8/walk_left.png">
# Used for animating the walk right
<image url="http://www.moipal.com:8080/dev/8/walk_right.png">