mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
18 lines
602 B
CoffeeScript
18 lines
602 B
CoffeeScript
CocoCollection = require 'collections/CocoCollection'
|
|
Level = require 'models/Level'
|
|
|
|
module.exports = class LevelCollection extends CocoCollection
|
|
url: '/db/level'
|
|
model: Level
|
|
|
|
fetchForClassroom: (classroomID, options={}) ->
|
|
options.url = "/db/classroom/#{classroomID}/levels"
|
|
@fetch(options)
|
|
|
|
fetchForClassroomAndCourse: (classroomID, courseID, options={}) ->
|
|
options.url = "/db/classroom/#{classroomID}/courses/#{courseID}/levels"
|
|
@fetch(options)
|
|
|
|
fetchForCampaign: (campaignSlug, options={}) ->
|
|
options.url = "/db/campaign/#{campaignSlug}/levels"
|
|
@fetch(options)
|