Users and User-like Objects

User

All providers should offer a User object. A User ought to represent a single person.

User object: Properties

The following properties are assumed to exist, either as plain objects or via getters:

User object: Expensive properties

The following methods each return a Promise for the property that they encapsulate. They should reject if no such property can exist.

User object: actions

The following actions are assumed to be available to be performed on a Post. Each should act upon the actual post in the system, and return a Promise that will resolve if the action completes or reject if it does not.

Static: get

A static method should be provided to allow for retrieving arbitrary users. It will be given one arguments: the primary identifier for the user.

This method should return a promise that will resolve to the requested User object.

Static: getByName

A static method should be provided to allow for retrieving arbitrary users. It will be given one arguments: a string containing the complete username for the User.

This method should return a promise that will resolve to the requested User object.

Static: parse

A static method should be provided to allow for parsing arbitrary Users. It will be given one arguments: the raw payload retrieved from the API for the forum.

This method should return a promise that will resolve to the requested User object.