The current JSON API Documentation (a wiki page on GitHub) claims that filter_cat[], releases[], bitrates[], formats[], and media[] usage follows from that on requests.php.
Monkeying with queries on requests.php, I see that filter_cat specs a bitmask as an array of 0's and 1's, where any trailing zeros may be ignored. The others (releases, bitrates, formats, and media), however, spec bitmasks by indices to the 1's. The results page from a requests.php query aligns with the documented JSON API equivalent:
request = {
'action': 'requests',
'search': '2015',
'page': 1,
'sort': 'desc', # This is not documented, but works (extrapolated from `requests.php`)
'order': 'votes', # This is not documented, but works (extrapolated from `requests.php`)
'filter_cat': [0,1],
'releases': [1,5,6,9],
'formats': [0,1],
'bitrates': [2,6,7,8,9],
'media': [0,2,7]
}
Parametrizing a JSON query with the above does not yield the same results as the HTTP request. If I map releases, bitrates, formats, and media to filter_cat-analogous bitmaps, then I get results that parallel the HTTP request (I only verified the first three entries):
The current JSON API Documentation (a wiki page on GitHub) claims that
filter_cat[]
,releases[]
,bitrates[]
,formats[]
, andmedia[]
usage follows from that on requests.php.Monkeying with queries on
requests.php
, I see thatfilter_cat
specs a bitmask as an array of 0's and 1's, where any trailing zeros may be ignored. The others (releases
,bitrates
,formats
, andmedia
), however, spec bitmasks by indices to the 1's. The results page from a requests.php query aligns with the documented JSON API equivalent:Parametrizing a JSON query with the above does not yield the same results as the HTTP request. If I map
releases
,bitrates
,formats
, andmedia
tofilter_cat
-analogous bitmaps, then I get results that parallel the HTTP request (I only verified the first three entries):