Difference between revisions of "Apibot 0.40 docs"

From Apibot
Jump to: navigation, search
m (9 replacements)
m (Mains -> Core)
 
Line 17: Line 17:
 
== Internals ==
 
== Internals ==
  
=== [[Mains class|The Mains class]] ===
+
=== [[Core class|The Core class]] ===
  
This is a container class that exports the objects providing the base Apibot functionality. A Mains object is required for creating nearly every object from the Apibot interfaces.
+
This is a container class that exports the objects providing the base Apibot functionality. A Core object is required for creating nearly every object from the Apibot interfaces.
  
 
=== [[Info class|The Info class]] ===
 
=== [[Info class|The Info class]] ===
  
One of the objects in the Mains class, Info is special because it provides an incredible wealth of info about the wiki, the user etc - literally anything you might need to know about them.
+
One of the objects in the Core class, Info is special because it provides an incredible wealth of info about the wiki, the user etc - literally anything you might need to know about them.
  
 
=== [[Dataobject class|The Dataobject class]] and its descendants ===
 
=== [[Dataobject class|The Dataobject class]] and its descendants ===

Latest revision as of 01:30, 10 November 2014

This is the documentation of Apibot 0.40. (Currently, mostly bare-bones.)

Interfaces

Apibot has two interfaces - the more traditional Bridge and the Lego-like Assembly line.

The Bridge interface

This is an interface similar to most other MW bot interfaces (including that of Apibot 0.3x).

The Assembly line interface

This is an interface that consists of a lot of objects tailored to specific tasks. You assemble from them a processing line, much as a factory assembly line, tailored to your task. (Or, for the Unix / Linux heads, like a complex command line piping data from one command to another.) You can see some examples for it here.

The classes for these objects are implemented in files in the directory line and its subdirectories.

Internals

The Core class

This is a container class that exports the objects providing the base Apibot functionality. A Core object is required for creating nearly every object from the Apibot interfaces.

The Info class

One of the objects in the Core class, Info is special because it provides an incredible wealth of info about the wiki, the user etc - literally anything you might need to know about them.

The Dataobject class and its descendants

Apibot can present most wiki data objects as either arrays or objects. The second case allows supplying them also with some convenient methods. The classes for these objects are descendants of the class Dataobject.

Data array structures

The data Apibot fetches, processes and writes back can be used as either objects or PHP arrays. Most of the objects are descendants of The Dataobject class. Here are described the PHP arrays used.

The bot settings structure

When starting Apibot, you can pass it a lot of settings that influence its behavior. Here you can find a description for them.

The bot wiki description and logins structure

When starting Apibot, you can pass it a lot of settings that influence its behavior. Here you can find a description for them.