Hi Frank,
I added that calendar through the UI, then retrieved the allcalendars feed and
selected the weather calendar and then using its URI, i sent an authenticated
feed request to fetch the data.I think the culprit is :
protected virtual Uri ParseUri(Uri targetUri)
{
Reset();
StringBuilder newPath = null;
UriBuilder newUri = null;
if (targetUri != null)
{
TokenCollection tokens;
// want to check some basic things on this guy first...
ValidateUri(targetUri);
newPath = new StringBuilder("", 2048);
newUri = new UriBuilder(targetUri);
newUri.Path = null;
newUri.Query = null;
// now parse the query string and take the properties out
string[] parts = targetUri.Segments;
When we supply http://www.google.com/calendar/feeds/[EMAIL
PROTECTED]/private/full?max-results=2147483647&start-min=2005-07-26T18:30:00Z&start-max=2011-01-15T18:30:00Z&ctz=Asia/Calcutta
the last statement above divides it into 4 parts with "p" as one of them which
should have been [EMAIL PROTECTED]
Thanks
Kulvinder Singh
----- Original Message ----
From: Frank Mantek <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, April 21, 2008 6:59:21 PM
Subject: Re: The remote server returned an error: (400) Bad Request.
How are you creating that url? is this constructed using a Query
object, like:
FeedQuery q = new FeedQuery("urlpassedin");
?
if so, then i can not easily do this without a lot of helper code to
parse the string passed into. I could create helpers, like in the
newer services, where you give me the username, and i construct the
URL out of it. this is why i added the helper for UrlEncodeUnsafe.
So what method did you use to construct the query?
Frank Mantek
Google
On Apr 21, 2008, at 1:23 PM, Kulvinder Singh wrote:
> Hi Frank,
>
> I am completely relying on the API. I think API should encode the
> URL on its own rather than Client. What do you say ?
>
> Thanks
> Kulvinder Singh
>
>
> ----- Original Message ----
> From: Frank Mantek <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Monday, April 21, 2008 4:31:45 PM
> Subject: Re: The remote server returned an error: (400) Bad Request.
>
> How did you construct that URI? I would assume that the [EMAIL PROTECTED]
> should be encoded?
>
> Frank Mantek
> Google
>
> On Apr 21, 2008, at 11:41 AM, Kulvinder Singh wrote:
>
> Hi,
>
> I am trying to download the weather calendar data but getting the
> following error :
>
> Execution of request failed: http://www.google.com/calendar/feeds/p#weather
> @group.v.calendar.google.com/private/full?max-
> results=2147483647&start-min=2005-07-26T18:30:00Z&start-
> max=2011-01-15T18:30:00Z&ctz=Asia/Calcutta
>
> InnerException : The remote server returned an error: (400) Bad
> Request.
> Invalid UserId p
> StackTrace : at Google.GData.Client.Service.Query(Uri queryUri,
> DateTime ifModifiedSince)
>
> Please let me know how did the google server figured out the
> username as "p" which is wrong.
>
> Thanks
> Kulvinder Singh
>
> ________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
> Try it now.
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---