-
Notifications
You must be signed in to change notification settings - Fork 11
API filter
Manuel Strehl edited this page Aug 2, 2013
·
2 revisions
Template for this request:
http://codepoints.net/api/v1/filter/{data}{?property*}{?callback}
where {data}
is an UTF-8 encoded string and {?property}
are Unicode
properties to filter by. Properties can be negated by appending a !
like
this:
?age=1.1&gc!=Nd
This request filters the {data}
for all codepoints added in Unicode 1.1 and
not having the general category (gc
) “Decimal Number”.
Properties can appear more than once, but must then have a []
appended:
?age[]=1.1&age[]=2.0&gc![]=Nd&gc![]=No
{?callback}
is an optional callback function name to perform a JSON-P
request.
The response is a JSON string filtered for codepoints matching the given criteria.
- 414 Request URI too Long: When
{data}
exceeds the maximum length (1024 codepoints at the moment). - 400 Bad Request: When an unknown property appears.
- 500 Server Error: When for some reason the SQL query for filtering fails. Please open a ticket in this case, so we can handle such an error.