@@ -273,10 +273,10 @@ module.exports = class Blink {
273273 } ) ;
274274 }
275275
276- getVideos ( ) {
276+ getVideos ( page = 0 , since = new Date ( 2008 ) ) { // Blink was founded in 2009
277277 return new Promise ( ( resolve , reject ) => {
278278 request ( {
279- url : this . urls . video_url ,
279+ url : ` ${ this . urls . video_url } ?since= ${ since . toISOString ( ) } &page= ${ page } ` ,
280280 headers : this . _auth_header ,
281281 json : true
282282 } , ( err , response , body ) => {
@@ -343,7 +343,7 @@ module.exports = class Blink {
343343 'Host' : this . _host ,
344344 'TOKEN_AUTH' : this . _token
345345 } ;
346- this . urls = new BlinkURLHandler ( this . _region_id ) ;
346+ this . urls = new BlinkURLHandler ( this . _account_id , this . _region_id ) ;
347347 }
348348 _getAuthToken ( repeats = 0 ) {
349349 return new Promise ( ( resolve , reject ) => {
@@ -385,7 +385,7 @@ module.exports = class Blink {
385385 'TOKEN_AUTH' : this . _token
386386 } ;
387387
388- this . urls = new BlinkURLHandler ( this . _region_id ) ;
388+ this . urls = new BlinkURLHandler ( this . _account_id , this . _region_id ) ;
389389 resolve ( true ) ;
390390 } ;
391391
@@ -484,7 +484,7 @@ module.exports = class Blink {
484484 }
485485
486486 that . _account_id = that . _networks [ 0 ] . account_id ;
487- that . urls = new BlinkURLHandler ( that . regionId ) ;
487+ that . urls = new BlinkURLHandler ( that . accountId , that . regionId ) ;
488488 return resolve ( that ) ;
489489 }
490490 } ) ;
0 commit comments