Sign inSign up

0x41mmar/openddr-api

By 0x41mmar

•Updated almost 7 years ago

OpenDDR working in a simple API.

Image
0

814

0x41mmar/openddr-api repository overview

This is a straightforward build of a Servlet implementation of OpenDDR, taken straight from https://github.com/OpenDDRmobi/openddr-examples⁠

It exposes a single API endpoint at :8080/classify?ua=

GET /classify

Classify a device using a user-agent header or param

-params: ua

The response is a json object with all device details on file. Example:

UA = Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-P600 Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.3 Chrome/38.0.2125.102 Safari/537.36

Response: { "success": true, "user-agent": "Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-P600 Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.3 Chrome/38.0.2125.102 Safari/537.36", "time_microseconds": 1648577, "result": { "id": "SM-P600", "attributes": { "displayHeight": "2560", "displayWidth": "1600", "ajax_support_inner_html": "true", "mobile_browser_version": "38.0.2125.102", "is_tablet": "true", "ajax_support_getelementbyid": "true", "ajax_support_javascript": "true", "displayUnit": "pixel", "ajax_manipulate_dom": "true", "ajax_manipulate_css": "true", "vendor": "Samsung", "model": "SM-P600", "from": "oddr", "id": "SM-P600", "mobile_browser": "Android Webkit", "is_bot": "false", "nokia_edition": "0", "is_wireless_device": "true", "ajax_support_event_listener": "true", "device_os": "Android", "inputDevices": "touchscreen", "nokia_series": "0", "ajax_support_events": "true", "xhtml_format_as_css_property": "false", "marketing_name": "Galaxy Note 10.1 2014", "image_inlining": "true", "device_os_version": "5.1.1", "xhtml_format_as_attribute": "false", "is_desktop": "false", "dual_orientation": "true" } } }

Tag summary

Content type

Image

Digest

Size

222.3 MB

Last updated

almost 7 years ago

docker pull 0x41mmar/openddr-api