Google Groups Home
Help | Sign in
API change ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
mic  
View profile
 More options Mar 21, 8:39 am
From: mic <mic...@gmail.com>
Date: Fri, 21 Mar 2008 05:39:53 -0700 (PDT)
Local: Fri, Mar 21 2008 8:39 am
Subject: API change ?
I used this piece of code to get thumbnail image and link to the phto
page, but it doesn't work anymore ; is it a new API version (the
<feed><entry><content src=""> doesn't exist anymore) ?

<?php
$feedXml = file_get_contents("http://picasaweb.google.fr/data/feed/api/
user/$strUser/?kind=photo&max-results=$intImg&imgmax=$intTaille");
    $feed = simplexml_load_string($feedXml);

    $arrImg = array();
    $i = 0;
    foreach ($feed->entry as $item) {
        $arrImg[$i]['src'] = (string) $entry-

>content['src'];

        $arrImg[$i]['href'] = (string) $item->link[1]['href'];
        $arrImg[$i]['alt'] = (string) $item->title;
        $arrImg[$i]['title'] = (string) $item->summary;
        $i++;
    }
?>

I now need to use something like :

<?php
$feedXml = file_get_contents("http://picasaweb.google.fr/data/feed/api/
user/$strUser/?kind=photo&max-results=$intImg&imgmax=$intTaille");
    $feed = simplexml_load_string($feedXml);
    $ns = $feed->getDocNamespaces();

    $arrImg = array();
    $i = 0;
    foreach ($feed->entry as $item) {
        $ns_media = $item->children($ns['media']);
        $arrImg[$i]['src'] = (string) $ns_media->group->thumbnail-

>attributes();

        $arrImg[$i]['href'] = (string) $item->link[1]['href'];
        $arrImg[$i]['alt'] = (string) $item->title;
        $arrImg[$i]['title'] = (string) $item->summary;
        $i++;
    }
?>

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tk.luczak  
View profile
 More options Mar 21, 10:25 am
From: "tk.luczak" <tk.luc...@gmail.com>
Date: Fri, 21 Mar 2008 07:25:24 -0700 (PDT)
Local: Fri, Mar 21 2008 10:25 am
Subject: Re: API change ?
I had the same problem. Code under C# used to be:

                Uri postUrl = new Uri("http://picasaweb.google.com/
data/entry/api/user/" + username + "/album/" + _albumName + "/
photoid/" + _photoID);
                try
                {
                    PicasaEntry pEntry =
service.Get(postUrl.ToString()) as PicasaEntry;
                    photoSrc = pEntry.Content.Src.Content;
                }
                catch (Google.GData.Client.GDataRequestException ex)
                {
                    photoSrc = null;
                }

know it is:

                Uri postUrl = new Uri("http://picasaweb.google.com/
data/entry/api/user/" + username + "/album/" + _albumName + "/
photoid/" + _photoID);
                try
                {
                    PicasaEntry pEntry =
service.Get(postUrl.ToString()) as PicasaEntry;
                    photoSrc =
(string)pEntry.Media.Content.Attributes.GetByIndex(

pEntry.Media.Content.Attributes.IndexOfKey("url")
                                                                   );
                }
                catch (Google.GData.Client.GDataRequestException ex)
                {
                    photoSrc = null;
                }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Fisher (Google)  
View profile
 More options Mar 21, 1:16 pm
From: "Jeff Fisher (Google)" <api.jfis...@google.com>
Date: Fri, 21 Mar 2008 10:16:10 -0700 (PDT)
Local: Fri, Mar 21 2008 1:16 pm
Subject: Re: API change ?
Hi,

I checked in our documentation and it says <media:content> uses the
url attribute to specify the link:

http://code.google.com/apis/picasaweb/reference.html#media_content

Then, not being one to trust that the docs haven't been updated in the
not so distant future, I dug into the revision history. This element
has not been changed since launch last year. As far as I know, it has
always been the url attribute that people have had to use to retrieve
the <media:content> link. It appears to be a similar story for
<media:thumbnail> as well.

Cheers,
-Jeff

On Mar 21, 7:25 am, "tk.luczak" <tk.luc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cameron Hinkle  
View profile
 More options Mar 21, 1:29 pm
From: "Cameron Hinkle" <goldplateddiap...@gmail.com>
Date: Fri, 21 Mar 2008 10:29:10 -0700
Local: Fri, Mar 21 2008 1:29 pm
Subject: Re: API change ?

I started using the data api last september and I've always gotten the
content and thumbnail from the url attribute of <media:content> and
<media:thumbnail>.  I don't ever remember seeing just a <content> element
inside <entry>.

Cameron

On Fri, Mar 21, 2008 at 10:16 AM, Jeff Fisher (Google) <

--
http://www.cameronhinkle.com/

"As systems developers, we have selected ourselves into the world of cool,
calming, rational thought. Either our code compiles, or it doesn't. The
compiler is never happy for us, nor mad at us. Perhaps this is why we tend
to apply logic as our main device for resolving disputes." -Peopleware, 2nd
Edition

"Babies...before we're done here...y'all be wearing gold-plated diapers."
-Rock Legend Bruce Dickinson


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Fisher (Google)  
View profile
 More options Mar 21, 3:03 pm
From: "Jeff Fisher (Google)" <api.jfis...@google.com>
Date: Fri, 21 Mar 2008 12:03:39 -0700 (PDT)
Local: Fri, Mar 21 2008 3:03 pm
Subject: Re: API change ?
Hi,

I was mistaken, the issue is that <atom:content> has changed (it's
missing) rather than anything to do with <media:content>. I'm looking
into this now.

Cheers,
-Jeff

On Mar 21, 10:29 am, "Cameron Hinkle" <goldplateddiap...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Cheng  
View profile
 More options Mar 21, 4:17 pm
From: Joe Cheng <joe.ch...@gmail.com>
Date: Fri, 21 Mar 2008 13:17:31 -0700 (PDT)
Local: Fri, Mar 21 2008 4:17 pm
Subject: Re: API change ?

> I was mistaken, the issue is that <atom:content> has changed (it's
> missing) rather than anything to do with <media:content>. I'm looking
> into this now.

This has broken my team's app (Windows Live Writer) as well. Please do
keep us posted.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Fisher (Google)  
View profile
 More options Mar 21, 7:00 pm
From: "Jeff Fisher (Google)" <api.jfis...@google.com>
Date: Fri, 21 Mar 2008 16:00:25 -0700 (PDT)
Local: Fri, Mar 21 2008 7:00 pm
Subject: Re: API change ?
Hi Joe,

We have identified the problem and found a solution. We are currently
testing for further regressions. I will update the thread when the fix
is live.

Cheers,
-Jeff

On Mar 21, 1:17 pm, Joe Cheng <joe.ch...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Boyd (Google)  
View profile
 More options Mar 21, 8:46 pm
From: "Ryan Boyd (Google)" <api.rb...@google.com>
Date: Fri, 21 Mar 2008 17:46:06 -0700 (PDT)
Local: Fri, Mar 21 2008 8:46 pm
Subject: Re: API change ?
Hi everyone,

This issue should now be resolved.  Our apologies, and thanks much for
your patience!

Cheers,
-Ryan (on behalf of Jeff)

On Mar 21, 4:00 pm, "Jeff Fisher (Google)" <api.jfis...@google.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Cheng  
View profile
 More options Mar 21, 11:13 pm
From: Joe Cheng <joe.ch...@gmail.com>
Date: Fri, 21 Mar 2008 20:13:56 -0700 (PDT)
Local: Fri, Mar 21 2008 11:13 pm
Subject: Re: API change ?
Thanks guys!

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mic  
View profile
 More options Mar 22, 1:17 pm
From: mic <mic...@gmail.com>
Date: Sat, 22 Mar 2008 10:17:20 -0700 (PDT)
Local: Sat, Mar 22 2008 1:17 pm
Subject: Re: API change ?
OK, it works again.

Thanks for your quick answer and fix...

On 22 mar, 01:46, "Ryan Boyd (Google)" <api.rb...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google