Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClassMedia = MediaType("application/studiously.class+json", func() {
Attributes(func() {
Attribute("id", Integer)
Attribute("name", String)
Attribute("current_unit", Integer, "Current unit of study")
Required("id", "name")
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("current_unit")
})
})
View Source
var MemberMedia = MediaType("application/studiously.member+json", func() {
Attributes(func() {
Attribute("id", Integer)
Attribute("name", String)
Attribute("role", String, func() {
Enum("student", "moderator", "teacher", "administrator")
})
Required("id", "name", "role")
})
View("default", func() {
Attribute("id")
Attribute("name")
Attribute("role")
})
})
View Source
var QuestionMedia = MediaType("application/studiously.question+json", func() {
Attributes(func() {
Attribute("id", Integer)
Attribute("question_type", String)
Attribute("author_id", Integer)
Attribute("unit_id", Integer)
Attribute("votes", Integer)
Attribute("answered", Boolean)
Attribute("data", Any)
Required("id", "question_type", "unit_id")
})
View("default", func() {
Attribute("id")
Attribute("question_type")
Attribute("author_id")
Attribute("unit_id")
Attribute("votes")
Attribute("answered")
Attribute("data")
})
View("by_unit", func() {
Attribute("id")
Attribute("question_type")
Attribute("author_id")
Attribute("votes")
Attribute("answered")
Attribute("data")
})
View("by_author", func() {
Attribute("id")
Attribute("question_type")
Attribute("unit_id")
Attribute("votes")
Attribute("answered")
Attribute("data")
})
View("by_type", func() {
Attribute("id")
Attribute("author_id")
Attribute("unit_id")
Attribute("votes")
Attribute("answered")
Attribute("data")
})
View("feed", func() {
Attribute("id")
Attribute("author_id")
Attribute("unit_id")
Attribute("votes")
Attribute("answered")
})
})
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.