device_os_version value type
Posted: Tue Jan 26, 2016 5:16 pm
Hi,
According to the spec (http://scientiamobile.com/wurflCapability) device_os_version value is string.
I use java client and get double when the value is set and string ("") when it is not.
Log snippets:
double example:
String example:
This is rather a bug of the cloud service.
Simple bash cloud client proves that device_os_version data type is wrong before any client processing.
Simple bash client:
gives
while
returns
Thanks.
Edits:
- Updated the log snippets.
- Add bash client results.
According to the spec (http://scientiamobile.com/wurflCapability) device_os_version value is string.
I use java client and get double when the value is set and string ("") when it is not.
Log snippets:
double example:
Code: Select all
[INFO] 01:03:57.482 [388357135@qtp-404214852-0] INFO c.s.wurflcloud.CloudClient - message: {"apiVersion":"WurflCloud 1.5.0.2","mtime":1452529268,"id":"google_nexus7_ver1_suban51","capabilities":{"brand_name":"Google","model_name":"Nexus 7","device_os":"Android","device_os_version":5.1,"mobile_browser":"Chrome Mobile"},"errors":{}}
Code: Select all
[INFO] 02:15:55.140 [388357135@qtp-404214852-0] INFO c.s.wurflcloud.CloudClient - message: {"apiVersion":"WurflCloud 1.5.0.2","mtime":1452529268,"id":"generic_web_browser","capabilities":{"brand_name":"generic web browser","model_name":"","device_os":"","device_os_version":"","mobile_browser":""},"errors":{}}
Simple bash cloud client proves that device_os_version data type is wrong before any client processing.
Simple bash client:
Code: Select all
#!/bin/bash
API_KEY="<api key>"
if [[ "$#" -lt 2 ]]; then
echo "usage: wcurl <capability> <user agent string>"
exit 1
fi
curl -u "$API_KEY" -A "$2" "http://api.wurflcloud.com/v1/json/search:($1)"
echo
Code: Select all
$ ./wcurl device_os_version "Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13D15 Safari/601.1"
Code: Select all
{"apiVersion":"WurflCloud 1.5.0.2","mtime":1452529571,"id":"apple_iphone_ver9_2","capabilities":{"device_os_version":9.2},"errors":{}}
Code: Select all
$ ./wcurl device_os_version "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"
Code: Select all
{"apiVersion":"WurflCloud 1.5.0.2","mtime":1452529571,"id":"generic_web_browser","capabilities":{"device_os_version":""},"errors":{}}
Edits:
- Updated the log snippets.
- Add bash client results.