This document describes functions, their arguments, return values, error codes, and other information used to interact with the TMBO server at thismight.be.
There are three methods of authentication:
The API supports 5 distinct data types for parameters, as described below.
The API supports 4 formats, which are determined by the server by the filetype extension of the request.
The following error codes are used by the site as return values:
Like the RSS feeds, requests are limited to a maximum of 200 returned elements. If you want to download the entire history of the world since the dawn of time for your research project, that's fine but please sleep between requests.
This API does not support the load of TMBO on its own, so you may find some queries are inefficient and take a while to complete. If you notice calls taking more than two seconds, please send an email or open a ticket with the method/arguments you're requesting, and try to reduce your usage until the problem is addressed.
The user-agent of the client is used to identify the client.
If you are developing an application, please send an email or open a ticket with your application name and a sample user agent.
Here are some useful examples:
https://thismight.be/offensive/api.php/getuploads.plist?type=image&limit=100&token=yourtoken
https://thismight.be/offensive/api.php/getuploads.plist?type=image&limit=100&sort=votes_desc&token=yourtoken
More examples for each method can be found with its documentation.
To jump to a function, click its link below:
Get one or more uploads' metadata, including (if possible) links to the uploaded files themselves, and their thumbnails.
Array of Upload objects.
getuploads.xxx?type=image&nsfw=0&sort=date_asc&limit=3,10
:
json
plist
php
xml
getupload - Get an upload's metadata, including (if possible) links to the uploaded files themselves, and their thumbnails. Calling this function updates your pickuplink.
Get an upload's metadata, including (if possible) links to the uploaded files themselves, and their thumbnails.
Calling this function updates your pickuplink.
A singleton Upload object or an Error object if upload does not exist.
getupload.xxx?fileid=2
:
json
plist
php
xml
getupload.xxx?fileid=112
:
json
plist
php
xml
getuploads - Get one or more uploads' metadata, including (if possible) links to the uploaded files themselves, and their thumbnails.
Get upload metadata for one or more users' current avatars.
To access non-current avatars, use getuploads(type=avatar).
A singleton Upload object if userid is specified, an array of Upload objects otherwise. Returns false if the userid does not exist.
getyearbook.xxx?userid=2054
:
json
plist
php
xml
getyearbook.xxx?limit=2&sort=date_asc
:
json
plist
php
xml
getuploads - Get one or more uploads' metadata, including (if possible) links to the uploaded files themselves, and their thumbnails.
Get a user's metadata.
If the userid exists, returns a user metadata object. Returns false if the userid does not exist.
getuser.xxx?userid=151
:
json
plist
php
xml
Get a user's posse.
If the userid exists, returns a possibly-empty array of user metadata objects. Returns false if userid does not exist.
getposse.xxx?userid=2054
:
json
plist
php
xml
getposse.xxx?userid=22
:
json
plist
php
xml
getuser - Get a user's metadata.
Establish a session for future requests and/or generate a token.
The token is named after the user-agent of the requesting application and can be revoked by the user at any time in /offensive/?c=settings.
a token object or the metadata for the current user.
login.xxx?username=jonxp&password=tester
:
json
plist
php
xml
login.xxx?username=ray&password=tester&gettoken=1
:
json
plist
php
xml
getuser - Get a user's metadata.
logout - Destroys the current session and invalidates the rememberme cookie. Unnecessary if you are only using a token to authenticate, which doesn't create a login session.
Destroys the current session and invalidates the rememberme cookie.
Unnecessary if you are only using a token to authenticate, which doesn't create a login session.
This method takes no arguments.
true
logout.xxx?
:
json
plist
php
xml
login - Establish a session for future requests and/or generate a token. The token is named after the user-agent of the requesting application and can be revoked by the user at any time in /offensive/?c=settings.
An array of comment objects.
getcomments.xxx?thread=112
:
json
plist
php
xml
Post a comment to a thread.
All parameters to this function are processed via the POST method, to prevent malicious votes via link shorteners.
No examples yet pending doc system support for POST in examples. Sorry.
Comment object or false if nothing was added to the database.
Find a user by username.
Array of User objects matching query string.
searchuser.xxx?q=max&limit=3
:
json
plist
php
xml
getuser - Get a user's metadata.
Find an upload by filename.
Array of Upload objects matching query string.
searchuploads.xxx?q=weekend&limit=5
:
json
plist
php
xml
login - Establish a session for future requests and/or generate a token. The token is named after the user-agent of the requesting application and can be revoked by the user at any time in /offensive/?c=settings.
Get the reported location of one or more maxxers.
This data is user-reported, so it's likely that everyone is lying.
The format of the data returned from this call is unstable and subject to change. Do not use this in a shipping application.
An array of location data from the database matching the parameters.
getlocation.xxx?limit=5
:
json
plist
php
xml
getlocation.xxx?userid=2054
:
json
plist
php
xml
setlocation - Set a user's location
Set a user's location
true
setlocation.xxx?lat=50&long=50
:
json
plist
php
xml
getlocation - Get the reported location of one or more maxxers. This data is user-reported, so it's likely that everyone is lying. The format of the data returned from this call is unstable and subject to change. Do not use this in a shipping application.
Retrieves the given user preference
The value of the preference (may be null)
get_preference.xxx?key=ipickup
:
json
plist
php
xml
set_preference - Set the given user preference
Set the given user preference
true
set_preference.xxx?key=ipickup&value=12345
:
json
plist
php
xml
get_preference - Retrieves the given user preference
Get a list of unchecked activity on subscribed threads.
Array of Comment objects containing the oldest unread comment for each thread with unread comments.
unreadcomments.xxx?limit=3&sort=file_asc
:
json
plist
php
xml
subscribe - (Un)Subscribe to new posts in a thread.
resetsubscription - Reset your subscription to a thread. New posts made to the thread after this call will cause the subscription to become active again.
(Un)Subscribe to new posts in a thread.
unsubscribe always returns true. subscribing returns false if thread does not exist.
subscribe.xxx?threadid=211604&subscribe=1
:
json
plist
php
xml
resetsubscription - Reset your subscription to a thread. New posts made to the thread after this call will cause the subscription to become active again.
unreadcomments - Get a list of unchecked activity on subscribed threads.
Reset your subscription to a thread. New posts made to the thread after this call will cause the subscription to become active again.
true if reset, false if no subscription or upload does not exist.
resetsubscription.xxx?threadid=309779
:
json
plist
php
xml
subscribe - (Un)Subscribe to new posts in a thread.
unreadcomments - Get a list of unchecked activity on subscribed threads.
If the API lacks notable functionality, or operates in an unexpected manner, please report this behaviour (expected and actual, if applicable) to the tmbotech mailing list, open a new issue, or send numist an email.