pad.pub0.org/doc/jsdoc/db/AuthorManager.md

54 lines
1.3 KiB
Markdown
Raw Normal View History

2011-07-30 16:15:45 +00:00
# db/AuthorMana
`require("./db/AuthorManager");`
2011-05-29 20:30:56 +00:00
2011-05-30 14:53:11 +00:00
The AuthorManager controlls all information about the Pad authors
## Functions
2011-05-30 15:05:42 +00:00
- - -
2011-07-30 16:15:45 +00: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 14:53:11 +00: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 15:05:42 +00:00
- - -
2011-05-30 14:53:11 +00:00
### getAuthorColorId (author, callback)
2011-05-29 20:30:56 +00:00
Returns the color Id of the author
2011-05-30 14:53:11 +00:00
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, colorId)
2011-05-29 20:30:56 +00:00
2011-05-30 15:05:42 +00:00
- - -
2011-05-30 14:53:11 +00:00
### getAuthorName (author, callback)
2011-05-29 20:30:56 +00:00
Returns the name of the author
2011-05-30 14:53:11 +00:00
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, name)
2011-05-29 20:30:56 +00:00
2011-05-30 15:05:42 +00:00
- - -
2011-05-30 14:53:11 +00:00
### setAuthorColorId (author, colorId, callback)
2011-05-29 20:30:56 +00:00
Sets the color Id of the author
2011-05-30 14:53:11 +00:00
* **author** *(String)* The id of the author
* **colorId** *No description*
* **callback** *(Function)* (optional)
2011-05-29 20:30:56 +00:00
2011-05-30 15:05:42 +00:00
- - -
2011-05-30 14:53:11 +00:00
### setAuthorName (author, name, callback)
2011-05-29 20:30:56 +00:00
Sets the name of the author
2011-05-30 14:53:11 +00:00
* **author** *(String)* The id of the author
* **name** *No description*
* **callback** *(Function)* (optional)
2011-05-29 20:30:56 +00:00