etherpad-lite/doc/jsdoc/db/AuthorManager.md

54 lines
1.3 KiB
Markdown
Raw Normal View History

2011-07-30 18:15:45 +02:00
# db/AuthorMana
`require("./db/AuthorManager");`
2011-05-29 22:30:56 +02:00
2011-05-30 16:53:11 +02:00
The AuthorManager controlls all information about the Pad authors
## Functions
2011-05-30 17:05:42 +02:00
- - -
2011-07-30 18:15:45 +02:00
### getAuthor (author, callback)
Internal function that creates the database entry for an author
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, authorObj)
- - -
2011-05-30 16:53:11 +02:00
### getAuthor4Token (token, callback)
Returns the Author Id for a token. If the token is unkown,
it creates a author for the token
* **token** *(String)* The token
* **callback** *(Function)* callback (err, author)
The callback function that is called when the result is here
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### getAuthorColorId (author, callback)
2011-05-29 22:30:56 +02:00
Returns the color Id of the author
2011-05-30 16:53:11 +02:00
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, colorId)
2011-05-29 22:30:56 +02:00
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### getAuthorName (author, callback)
2011-05-29 22:30:56 +02:00
Returns the name of the author
2011-05-30 16:53:11 +02:00
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, name)
2011-05-29 22:30:56 +02:00
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### setAuthorColorId (author, colorId, callback)
2011-05-29 22:30:56 +02:00
Sets the color Id of the author
2011-05-30 16:53:11 +02:00
* **author** *(String)* The id of the author
* **colorId** *No description*
* **callback** *(Function)* (optional)
2011-05-29 22:30:56 +02:00
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### setAuthorName (author, name, callback)
2011-05-29 22:30:56 +02:00
Sets the name of the author
2011-05-30 16:53:11 +02:00
* **author** *(String)* The id of the author
* **name** *No description*
* **callback** *(Function)* (optional)
2011-05-29 22:30:56 +02:00