Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKey = APIKeySecurity("APIKey", func() {
Description("API key")
Header("Authorization")
})
View Source
var BasicAuth = BasicAuthSecurity("BasicAuth", func() {
Description("Basic Auth")
})
View Source
var Music = Type("music", func() {
Description("A music resource")
Attribute("id", String)
Attribute("tags", ArrayOf(String))
Required("id")
})
View Source
var MusicMediaType = MediaType("application/vnd.bluelens.music+json", func() { Description("Media type of a music resource") Reference(Music) ContentType("application/json") Attributes(func() { Attribute("id") Attribute("tags") Attribute("href") Required("id", "href") }) View("default", func() { Attribute("id") Attribute("tags") Attribute("href") }) View("full", func() { Attribute("id") Attribute("tags") Attribute("href") }) View("link", func() { Attribute("href") }) })
View Source
var RecommendationsMediaType = MediaType("application/vnd.bluelens.recommendations+json", func() { Description("A list of recommendations for the specified user") ContentType("application/json") Attributes(func() { Attribute("musicID", ArrayOf(String)) Attribute("list", CollectionOf(MusicMediaType)) Attribute("user", UserMediaType) Links(func() { Link("list") Link("user") }) Required("list", "user") }) View("default", func() { Attribute("musicID") Attribute("links") }) View("all", func() { Attribute("musicID") Attribute("list") Attribute("user") }) })
View Source
var User = Type("user", func() { Description("A user resource") Attribute("id", String) Attribute("followees", ArrayOf("user")) Attribute("history", ArrayOf(Music)) Required("id") })
View Source
var UserMediaType = MediaType("application/vnd.bluelens.user+json", func() { Description("Media type of a user resource") Reference(User) ContentType("application/json") Attributes(func() { Attribute("id") Attribute("followees", CollectionOf("application/vnd.bluelens.user+json")) Attribute("history", CollectionOf(MusicMediaType)) Attribute("href", String) Links(func() { Link("followees") Link("history") }) Required("id", "href") }) View("default", func() { Attribute("id") Attribute("href") Attribute("links") }) View("link", func() { Attribute("href") }) View("full", func() { Attribute("id") Attribute("followees") Attribute("history") Attribute("href") }) })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.