Hi,

as i see you mixed data. For example "alt" variable should be add to
url when GET request. "gdata-version" tag should be add into header of
request. So try to add correct data in correct place.

there you have part of my class where i request for list of contacts
in JSON format. It is in PHP.

                $ch = curl_init();
                $header = array('GET /m8/feeds/contacts/default/full HTTP/
1.1','Authorization: AuthSub token='.$this->sessiontoken,'Content-
Type: application/atom+xml','GData-Version: '.$v);
                curl_setopt($ch, CURLOPT_HEADER, false);
                curl_setopt($ch, CURLOPT_URL, "http://www.google.com/m8/feeds/
contacts/default/full?alt=json&max-results=999999");
                curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
                curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
                $res=curl_exec($ch);
Of course it is working and tested with API 3.0


On 18 Cze, 09:25, Donovan Walker <[email protected]> wrote:
> 3 questions then.
>
> 1. Get google to return gdata-version 3.0
> I'm passing in params that look like
> $params = array(
> "alt"=>"json",
> "max-results"=>"5",
> "start-index"=>"350",
> "gdata-version:"=>"3.0"
> );
> and i'm getting data back ok, but the gdata-version in header returned
> is 1.0. What's up with that? How do I  get it to change.. and/or is
> contacts just behind the times?
>
> 2. JSON Data Schema? Where?
> I'm looking for somewhere that has an example of the datastructure
> returned in JSON format. There are some inconsistencies in what i've
> read so-far. like a link of some kind that's supposed to retrieve a
> particular contact, but what I'm seeing is an id field encoded with a
> base feed url + userid + a base 16 number... where can I find an up-to-
> date schema for data returned?
>
> 3. Search?
> I've tried including a 'q' parameter, and got a 403 message 'we don't
> support q' is there a search command for this api? What if I only want
> to retrieve users with phone numbers, or with a name that includes
> 'Smith'?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to