DiFi

From Botdom Documentation
Jump to: navigation, search

DiFi, or deviantART Interactive Fragmented Interface, is an RPC/AJAX centric service used to populate pages and send data to and from the deviantART servers. Early research into DiFi and its capabilities was carried out by the dAmnHack team.

Contents

Format

Each DiFi packet is broken down into sections, as the dAmnHack team found, these sections are as follows:

Base URL

 http://www.deviantart.com/global/difi.php?c[]=

DiFi method call

There are two different formats for sending a DiFi call. One is as so:

 ?c[]=Class;method;argument1,argument2,argument3,etc

The other one, which is used in newer code, is as so:

 ?c[]="Class","method",["argument1","argument2","argument3","etc"]

With this newer method, there's a shortcut for calling the same method with two different sets of arguments. For example:

 ?c[]="Class","method",["argument1","argument2"],["argument3","argument4"]

...is equivalent to this:

 ?c[]="Class","method",["argument1","argument2"]&c[]="Class","method",["argument3","argument4"]

Here, argument1 .. argumentn are arguments to a DiFi method. As hinted above, you can set the c[] argument multiple times to do more than one DiFi call at once. The individual pieces of this call are the:

  • Class

The DiFi classes are listed below.

  • Method

See a class for methods.

  • Arguments

See a class method for arguments.

Encoding

This is set by using the t url variable

  • json — This gives the data output in the JSON standard format.
  • xml — This provides output as an XML document that can be parsed using any XML walker.
  • php — This gives an output of a multi-dimensional PHP array, very useful in maybe a PHP bot.
  • page — This provides an output of a deviantart.com page, with the data encoded into JSON as an object in the page.
  • default — This gives an output in a human-readable, messy table format, not at all recommended for use other than testing.

User info

Sometimes, in a call you must set an argument called ui, which appears to be your "userinfo" cookie. This is probably used to help prevent XSRF (Cross Site Request Forgery) as this has been a problem on deviantART in the past.

Classes

These are all of the currently known classes for DiFi:

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox