Closed GavinJoyce closed 11 years ago
Support implicit model filtering on:
belongs_to
Filtering will work as follows:
GET /albums.json?ids=1,2,3,4 will return four albums
GET /albums.json?ids=1,2,3,4
albums
GET /albums.json?artist_id=10 will return a page of albums for artist_id=10
GET /albums.json?artist_id=10
artist_id=10
GET /albums.json?artist_id=10&genre_ids=2,3,4 will return a page of albums for artist_id=10 which have a genre of either 2, 3 or 4
GET /albums.json?artist_id=10&genre_ids=2,3,4
genre
2
3
4
GET /albums.json?artist_ids=10,11,12 will return a page of albums for three artists
GET /albums.json?artist_ids=10,11,12
artists
https://github.com/RestPack/restpack-serializer/pull/10
Support implicit model filtering on:
belongs_to
relationshipsFiltering will work as follows:
GET /albums.json?ids=1,2,3,4
will return fouralbums
GET /albums.json?artist_id=10
will return a page ofalbums
forartist_id=10
GET /albums.json?artist_id=10&genre_ids=2,3,4
will return a page ofalbums
forartist_id=10
which have agenre
of either2
,3
or4
GET /albums.json?artist_ids=10,11,12
will return a page ofalbums
for threeartists