def getArticles(self, type, startPage, limit): mongoService = MongoService() listArticles = [] start = (startPage - 1) * config.pageSize mark = common.getMark() listArticles = mongoService.getListArticles(type, start, limit, mark) return listArticles
def getArticles(self, type, startPage, limit): mongoService=MongoService() listArticles=[] start = (startPage-1)*config.pageSize mark = common.getMark() listArticles=mongoService.getListArticles(type, start, limit, mark) return listArticles
def getArticles(self, themes_array, limits): mongoService=MongoService() array=[] mark = common.getMark() for theme in themes_array: listArticles=mongoService.getMainArticles(theme["theme_id"], limits, mark) array.extend(listArticles) return array
def getArticle(self, articleId): mark = common.getMark() mongoService = MongoService() article = mongoService.getArticles(articleId, mark) return article
def getListArticlesSum(self, type): mark = common.getMark() mongoService = MongoService() sum = mongoService.getListArticlesSum(type, mark) return sum
def getListArticlesSum(self, type): mark = common.getMark() mongoService=MongoService() sum = mongoService.getListArticlesSum(type, mark) return sum