+api gallery + gallery caching;

This commit is contained in:
tmshv committed 2015-07-08 22:06:15 +03:00
1 parent 97966817ea
commit a9a0b2c6b8
3 files changed
+38 -21

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
/**
* Created by tmshv on 22/11/14.
*/
function APIGallery(http){
this.request = http;
}
APIGallery.prototype.year = function(year) {
return this.request.get("/gallery/" + year, {cache: true});
};
APIGallery.prototype.album = function(year, course, album) {
var url = '/album/{year}/{course}/{album}'
.replace('{year}', year)
.replace('{course}', course)
.replace('{album}', album);
return this.request.get(url, {cache: true});
};
module.exports = APIGallery;