Description of Internal API

From PeopleAggregator

Jump to: navigation, search

The PeopleAggregator PHP API is a collection of libraries, in the /api directory (not to be confused with /web/api, the WSAPI), which interact with the database or third party controllers, etc.

The following directories under /api contain API classes:

Content This API handles creating micro-content. You can not use this API directly. The Content class is subclassed by micro-content types like BlogPost/Audio/Video (ext/BlogPost/BlogPost.php, ext/Audio/Audio.php, ext/Video/Video.php).

ContentCollection ContentCollections are containers of micro-content, e.g. groups and albums. The ContentCollection class is subclassed by ext/Group/Group.php and ext/Album/Album.php.

Category The Category API deals with the hierarchal category structure.

Comment The Comment API deals with comments on content items. You can add, delete, and edit comments using this API. It also handles spam detection.

ContentRouting This API manages linking internal and external content, such as sending content to an external destination, and adding a new destination to the system.

ExternalFeed This API is used to add new RSS feed links for a user. This API uses the Domit XML parser. With the help of this API, you can create a new feed for a user, fetch feeds for a user, etc.

ImageResize This API handles resizing and cropping images for display, using the GD and ImageMagick libraries.

Invitation This API handles user and group invitations for PA.

Links This API is used for managing links. The methods in the API allow creating, editing and deleting link categories and links under the categories.

Logger This API used for writing to the log file (/log/pa.log).

Message This API deals with private messages and message folders.

MessageBoard This API handles group message boards (bulletin boards).

ModuleSetting This API deals with modules -- which modules appear on which pages.

Network Creation, deletion, and access to network information is handled by this API.

PAException The main PAException class, which is used for all exceptions inside PA, is defined in this API. Exception codes are defined in api/PAException/PAExceptionCodes.php.

PageRenderer This API does most of the work of rendering a page: loading the lists of modules to display on the left, center and right columns of the page from the database, and loading and executing code to render the modules.

PAMicrocontent This API is used for handling [Structured Blogging] content - rendering edit forms and HTML for display.

Persona This API managing user's different accounts.

ProfileIO This API deals with personal profile information, including imported profile data.

Python This directory holds all Python libraries, used by the external service scraper (scoop - /scoop) and some of the scripts in /tools.

Relation This API is used for tracking relations ("friend relations") between users.

Tag This API is used for tagging.

Theme This API deals with the theme.

User This API handles user records. You can add a user (see also /api/User/Registration.php), load a user object for a given user_id, delete a user, etc.

Validation This API provides various validation functions - for URLs, e-mail addresses, etc. - as well as input sanitization (front end for /ext/InputSanitizer/InputSanitizer.php).

Personal tools