New webservice API
dirk at hohndel.org
Sun Jan 27 10:39:44 PST 2013
On Jan 27, 2013, at 10:34 AM, Pierre-Yves Chibon wrote:
> On Sun, 2013-01-27 at 20:31 +0200, Lubomir I. Ivanov wrote:
>> On 27 January 2013 20:20, Pierre-Yves Chibon <pingou at pingoured.fr> wrote:
>>> On Sun, 2013-01-27 at 20:18 +0200, Lubomir I. Ivanov wrote:
>>>> session = soup_session_async_new();
>>>> - strcat(url, "http://api.hohndel.org/api/mydives/");
>>>> + strcat(url, "http://api.hohndel.org/api/dive/get/?login=");
>>>> strcat(url, user_id);
>>>> - strcat(url, "/xml");
>>> This will not be enough, you need to specify the 'Accept' header to
>>> text/xml otherwise it will return you json.
>> strcat(url, "http://api.hohndel.org/api/dive/get/?login=");
>> strcat(url, user_id);
>> msg = soup_message_new("GET", url);
>> soup_message_headers_append(msg->request_headers, "Accept", "text/xml");
>> soup_session_send_message(session, msg);
>> this should do it then then?
>> patch attached.
> Sounds correct.
> Dirk, should we merge new_api into master then?
Well, I was hoping to get an idea from Aurélien if he could push an update to the
existing app that supports the new API before finishing the rest of the rewrite that
he is currently working on.
In off-list email he mentioned that it would take 2-3 weeks to finish the rewrite
and I'd love to have a working companion app when I'm diving a week from today :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4130 bytes
Desc: not available
More information about the subsurface