API

Here are the various available API functions for accessing Totoz.eu content. Interrogating http[s]://totoz.eu will only return safe for work images, use http://nsfw.totoz.eu (not yet available through HTTPS) to get complete results. This depends on users flagging images correctly.

Displaying totozes

http[s]://totoz.eu/img/<totoz name>[.gif]

The .gif extension is allowed for compatibility reasons, but serves no purpose as images can either be encoded as GIF, JPEG or PNG. A few older images could even be BMP. The actual content type is always specified in the Content-Type http header.

A special http header X-Safe-For-Work is also included and indicates whether an image has been flagged as safe for work (Yes) or not (No) in case clients wish to display them in a different manner without the overhead of a separate call to the information API.

When a totoz is requested that does not exist on Totoz.eu, it will be checked and pulled from Hardware.fr's forum smileys (which is the very origin of totozes, and has a large base of images) along with their tags and be stored as a new image on Totoz.eu (with author hfr).

A totoz flagged as not safe for work being requested on http[s]://totoz.eu will return a 403 Not Safe For Work error code. A totoz that does not exist at all will return a 404 Not Found error.

http[s]://totoz.eu/search.(xml|json)?terms=<search terms>&offset=<results offset>

Results are ordered by pertinence. Only the first 50 results are returned, use the offset parameter to retrieve the following results.

JSON


  {
    "results": 42,
    "totozes": [
        {
            "name": "totoz",
            "username": "hfr",
            "created": "2002-02-12T14:40:17+01:00",
            "changed": "2013-03-02T11:41:33+01:00",
            "nsfw": "0",
            "url": "http:\/\/nsfw.totoz.eu\/img\/totoz",
            "tags": [
                "craindre",
                "crainte",
                "effroi",
                "flippe",
                "non",
                "peur",
                "shinobu",
                "terreur",
                "totoz"
            ]
        }
    ]
}   

XML


<?xml version="1.0"?>
<totozes results="42">
  <totoz>
    <name>totoz</name>
    <username>hfr</username>
    <created>2002-02-12T14:40:17+01:00</created>
    <changed>2013-03-02T11:41:33+01:00</changed>
    <nsfw>0</nsfw>
    <url>http://nsfw.totoz.eu/img/totoz</url>
    <tags>
      <tag>craindre</tag>
      <tag>crainte</tag>
      <tag>effroi</tag>
      <tag>flippe</tag>
      <tag>non</tag>
      <tag>peur</tag>
      <tag>shinobu</tag>
      <tag>terreur</tag>
      <tag>totoz</tag>
    </tags>
  </totoz>
</totozes>
   

http[s]://totoz.eu/search/users.(xml|json)?terms=<search terms>&offset=<results offset>

Results are ordered by join date, ascending. Only the first 50 results are returned, use the offset parameter to retrieve the following results.

JSON


{
    "results": 42,
    "users": [
        {
            "username": "SeeSchloss",
            "joined": "2007-07-05T09:10:49+02:00",
            "seen": "2017-07-12T14:06:31+02:00",
            "totoz": "61"
        }
    ]
}   

XML


<?xml version="1.0"?>
<users results="42">
  <user>
    <username>SeeSchloss</username>
    <joined>2007-07-05T09:10:49+02:00</joined>
    <seen>2017-07-12T14:06:31+02:00</seen>
    <totoz>61</totoz>
  </user>
</users>
   

List

User totozes

http[s]://totoz.eu/users/<username>/totoz.(xml|json)

All totozes created by username are returned, ordered by date, in the same format as for search results, described above.

Latest totozes

http[s]://totoz.eu/latest.(xml|json)

50 latest totozes ordered by date, in the same format as for search results, described above.

The latest totozes are also available under two other formats, for compatibility with existing tools:

Tribune backend

http[s]://totoz.eu/latest/remote.xml


<?xml version="1.0"?>
<board site="http://nsfw.totoz.eu">
  <post id="11027" time="20130302114133">
    <info>craindre, crainte, effroi, flippe, non, peur, shinobu, terreur, totoz</info>
    <message>[:totoz]</message>
    <login>hfr</login>
  </post>
</board>
    
RSS

http[s]://totoz.eu/latest.rss


<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Latest totoz</title>
    <description>The latest images posted on totoz.eu</description>
    <link>/latest</link>
    <ttl>3600</ttl>
    <item>
      <title>totoz</title>
      <description>&lt;img src="http://nsfw.totoz.eu/img/totoz"&gt;&lt;br /&gt;&lt;p&gt;Tags: craindre, crainte, effroi, flippe, non, peur, shinobu, terreur, totoz&lt;/p&gt;</description>
      <link>http://nsfw.totoz.eu/totoz/totoz</link>
      <guid>11027</guid>
      <pubDate>Tue, 12 Feb 2002 14:40:17 +0100</pubDate>
    </item>
  </channel>
</rss>
    

Information

http[s]://totoz.eu/totoz/<totoz name>/info.(xml|json)

JSON


{
    "name": "totoz",
    "username": "hfr",
    "created": "2002-02-12T14:40:17+01:00",
    "url": "http:\/\/nsfw.totoz.eu\/img\/totoz",
    "md5sum": "25a3b5315bcc8ee943aad7bb381258a4",
    "weight": 5340,
    "format": "JPEG",
    "width": 67,
    "height": 50,
    "length": 0,
    "frames": 1,
    "nsfw": "0",
    "tags": [
        "craindre",
        "crainte",
        "effroi",
        "flippe",
        "non",
        "peur",
        "shinobu",
        "terreur",
        "totoz"
    ]
}   

XML


<?xml version="1.0"?>
<totoz>
  <name>totoz</name>
  <username>hfr</username>
  <created>2002-02-12T14:40:17+01:00</created>
  <url>http://nsfw.totoz.eu/img/totoz</url>
  <md5sum>25a3b5315bcc8ee943aad7bb381258a4</md5sum>
  <weight>5340</weight>
  <format>JPEG</format>
  <width>67</width>
  <height>50</height>
  <length>0</length>
  <frames>1</frames>
  <nsfw>0</nsfw>
  <tags>
    <tag>craindre</tag>
    <tag>crainte</tag>
    <tag>effroi</tag>
    <tag>flippe</tag>
    <tag>non</tag>
    <tag>peur</tag>
    <tag>shinobu</tag>
    <tag>terreur</tag>
    <tag>totoz</tag>
  </tags>
</totoz>
   

CLI tool

A command-line tool for searching and displaying totozes is available on github: ttz.