telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit 7bfc10e9071b70c2108bab64717d9b34f5fafa94
parent 8243341afd38a96c93509ac219717b9d886973ca
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon, 29 Mar 2021 13:09:32 +0200

Add the 'is_in_european_union' field if it's present in the MMDB database.

Diffstat:
Msrc/location.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/location.c b/src/location.c @@ -4,7 +4,7 @@ * https://www.telize.com * * Created: 2013-08-15 - * Last Updated: 2020-10-21 + * Last Updated: 2021-03-29 * * Telize is released under the BSD 2-Clause license. * See LICENSE file for details. @@ -105,6 +105,9 @@ request_location(struct http_request *req) } } + telize_getdata(json, &lookup, &entry_data, "is_in_european_union", + ENTRY_TYPE_BOOLEAN, "country", "is_in_european_union", NULL); + telize_getdata(json, &lookup, &entry_data, "region", ENTRY_TYPE_STRING, "subdivisions", "0", "names", "en", NULL);