I have been playing with switching between the model_name and marketing_name capabilities. In general the marketing_name appears to have the data that I want regarding the type of device.
However, for Apple devices (iPhone and IPad) the marketing_name capability is coming back blank. I understand that Apple's user agent makes it nearly impossible to tell the different types of devices apart, but it seems the marketing_name should at least have the data from model_name if there is not a value.
That would allow the API to be consistent for all device types, and allow users to choose between model_name and marketing_name and not have to pull both from the API.
The User Agent I am currently using for testing:
Mozilla/5.0 (iPad; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5
The response I am getting:
{
"apiVersion":"WurflCloud 1.5.0.2",
"mtime":1420484666,
"id":"apple_ipad_ver1_sub42",
"capabilities":{
"brand_name":"Apple",
"marketing_name":"",
"device_os":"iOS",
"device_os_version":4.2,
"advertised_browser":"Mobile Safari",
"advertised_browser_version":"4.3.5"
},"errors":{}}
Thanks.
marketing_name attribute blank
Re: marketing_name attribute blank
Hello,
This capability will return blank for these devices since Apple does not provide a marketing name for them. I might recommend using the complete_device_name capability as well, since it will concatenate the brand name, model name, and marketing name (when available) into a single string.
Thank you,
Elliot
This capability will return blank for these devices since Apple does not provide a marketing name for them. I might recommend using the complete_device_name capability as well, since it will concatenate the brand name, model name, and marketing name (when available) into a single string.
Thank you,
Elliot
Who is online
Users browsing this forum: No registered users and 63 guests