Hi Joachim,
The JavaScript API does not work for all of the properties that have a
Data API, only ones that it is specifically enabled on which currently
are Blogger and Calendar.
Cheers,
-Jeff
On Apr 27, 10:09 am, Joachim Rosskopf <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I´m trying to query my contacts feed using gdata.js. But so far I was
> not successful. I was trying something like this:
>
> <snip>
> google.load("gdata", "1");
> google.load("feeds", "1");
>
> function logMeIn() {
> scope = "http://www.google.com/m8/feeds/";
> var token = google.accounts.user.login(scope);
>
> return token;
> }
>
> function loadContacts() {
> var service = new
> google.gdata.client.GoogleService("cp",
> "TinyHost");
>
> var query = new
> google.gdata.client.Query("http://www.google.com/m8/
> feeds/contacts/default/base");
> query.setParam('max-results', 10);
>
> service.getFeed(query, loadContactsContinuation,
> loadContactsErrorHandler, true);
> }
>
> function loadContactsContinuation(feedRoot) {
> var feed = feedRoot.feed;
> }
>
> function loadContactsErrorHandler(error) {
> if (error.cause)
> alert("**Error** [" + error.cause.status + "]
> " +
> error.cause.statusText);
> else
> alert("**Error** " + error.message);
> }
>
> function initialize() {
>
> var token = logMeIn();
>
> if (token == null) {
> alert("No token.");
> return;
> }
>
> loadContacts();
> }
>
> google.setOnLoadCallback(initialize);
>
> </snip>
>
> Doing like mentioned above gave me an "500 request timed out". What is
> wrong. Is there an example how to do right?
>
> I used the same code to query my private calendar feed "http://
> www.google.com/calendar/feeds/[EMAIL PROTECTED]/private/full"
> which works perfectly. In the devguides I didn´t find a hint whats the
> difference.
>
> I already posted this question to calender api group without an
> sufficient answer.
> Regards
> ---
> Joachim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data 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-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---