Constructor
new EntryCollection(request, path, options)
Create an entry collection.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
object
|
Axios client. |
||||||||||||||||||||||||||||||
path |
string
|
Path or plain title. |
||||||||||||||||||||||||||||||
options |
object
|
Parameters that user can specify.
|
Extends
Members
currPage :number
Current page.
- Overrides:
- Source:
Type:
-
number
entries :Array.<(Entry|EntryForMember)>
Entry collection.
- Source:
Type:
-
Array.<(Entry|EntryForMember)>
pageCount :number
Total page count.
- Overrides:
- Source:
Type:
-
number
searchAuthor :string
Searched user's username.
- Source:
Type:
-
string
Methods
(async) createEntry(content, options) → {Promise.<(EntryForMember|DraftEntry)>}
Create entry.
- Source:
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
string
|
Entry content. |
||||||||||
options |
object
|
Parameters that user can specify.
|
Throws:
-
User not authorized.
- Type
-
AuthError
(async) first()
Retrieve first page.
- Overrides:
- Source:
(async) last()
Retrieve last page.
- Overrides:
- Source:
(async) next()
Retrieve next page.
- Overrides:
- Source:
(async) prev()
Retrieve previous page.
- Overrides:
- Source:
retrieve() → {Promise}
Retrieve the entry collection.
- Source:
Returns:
- Type:
-
Promise
Promise.