CommentModel
Model representing a comment.
Constructor Summary
Public Constructor | ||
public |
constructor(response: Object) |
Member Summary
Public Members | ||
public |
author: * |
|
public |
|
|
public |
|
|
public |
|
Public Constructors
public constructor(response: Object) source
Params:
Name | Type | Attribute | Description |
response | Object | JSON formatted response of a comment |
|
response.id | String | The comment id |
|
response.attributes | Object | Attributes for a comment |
|
response.attributes.body | String | The comment text |
|
response.attributes.created_at | String | The creation timestamp |
|
response.relations | String | The comment relationships |
|
response.relations.author | String | The comment author |
|
response.relations.author.id | String | The author's id |
|
response.relations.author.email | String | The author's email |
|
response.relations.author.username | String | The author's username |
|
response.relations.author.user_role | String | The author's role |