backroad
backroad copied to clipboard
Content type classification
At some point, it would be cool to add some sort of grouping aspect to the content API.
Much @TODO here...
The need for this is not immediately crucial, as developers already can create some field for a content type and then easily query it through the public API.
For example:
app.content.add({
id: 'movie',
name: 'Movie',
endpoint: 'movies',
pluralName: 'Movies',
fields: [
{
id: 'desc',
name: 'Movie Description',
help: 'Enter a description',
type: 'textarea'
},
{
id: 'genre',
name: 'Movie Genre',
type: 'select',
options: ['Action', 'Romance', 'Comedy']
}
]
});
In the above example, the genre
field could be considered a grouping, and one can currently already query the articles with a specific value for that field like this:
/api/v1/movies/?genre=Action