var request = require('request'); var cryptoJS = require("crypto-js"); /** * The helper of api */ class LjApiHelper { /** * Gets the API for query course * @param lessonId the lesson id * @param courseId the course id * @param eid the eid * @returns {string} the API url */ static getApiForQueryCourse(lessonId, courseId, eid) { var http = "http://tt-web.api.ai160.com/lesson/" + lessonId; http += "?courseId=" + courseId http += "&eid=" + eid http += "&cache=true"; return http; } /** * Gets the API for add download * @param lessonId the lesson id * @param data the data * @returns {string} */ static getApiForAddDownload(lessonId,courseId,data) { return "http://tt-web.api.ai160.com/callback/download/add?lessonId=" + lessonId+"&courseId="+courseId+"&data="+data; } /** * Gets the API for delete download * @param lessonId the lesson id * @param data the data * @returns {string} */ static getApiForDelDownload(lessonId,data) { return "http://tt-web.api.ai160.com/callback/download/delete?lessonId=" + lessonId+"&data="+data; } } module.exports = LjApiHelper;