Files
hudozka/client/api/gallery.js
T
2015-07-09 05:32:52 +03:00

22 lines
508 B
JavaScript

/**
* 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 = '/gallery/{year}/{course}/{album}'
.replace('{year}', year)
.replace('{course}', course)
.replace('{album}', album);
return this.request.get(url, {cache: true});
};
module.exports = APIGallery;