Core object

From Apibot
Revision as of 21:16, 20 July 2014 by Grigor Gatchev (talk | contribs) (some start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This object is the Apibot core. It provides all the functionality the bot interfaces and their objects give access to. It is required for creating nearly every Apibot interfaces or data object.

Nearly every script that uses Apibot will probably start with creating this object.


Requires two parameters:

Public properties

Except for the $info property, best do not access the others - unless you know really well what you are doing.

  • $info - the object that exports methods providing info about the wiki, bot account etc. A very useful one.
  • $browser - the object that provides the HTTP(S) level exchange
  • $infostore - the object that stores in files and retrieves different info (wiki etc)
  • $settings - the object that keeps and manages the bot global settings
  • $log - the object that provides the bot logging facilities
  • $backends - an array with objects that implement the Apibot backends

Public methods

  • login() - logs the bot in the wiki, and (re-)creates the object properties
  • logout() - unlogs the bot from the wiki