Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions get-history-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = bottle => bottle.service( 'getHistoryList', getHistoryList,
'restClient',
'apiUrls'
)
function getHistoryList( restClient, apiUrls ) {
function getHistoryList( restClient, apiUrls, limit ) {

class HistoryItem {

Expand All @@ -47,9 +47,9 @@ function getHistoryList( restClient, apiUrls ) {
}
}

return async() => {
return async( limit ) => {
const historyListUrl = apiUrls.doorbots().history()
const historyItems = await restClient.authenticatedRequest( 'GET', historyListUrl )
const historyItems = await restClient.authenticatedRequest( 'GET', `${historyListUrl}?limit=${limit || 20}` )

return historyItems.map( h => new HistoryItem( h ))
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ring-api",
"version": "3.0.7",
"version": "3.0.8",
"description": "Unofficial API for ring doorbells and other devices",
"main": "main.js",
"dependencies": {
Expand Down