|
RSS with URL for latest photo + URL to photo page + photo title
 |
Hi there,
I'm a complete newbie to the API (but a semi-skilled self-taught ASP developer), so bear with me. I have spent hours searching for what I'm requesting here, and I've had no luck.
I'd like an RSS feed that works like this:
Title: The title of the photo
Description: The photo in a small size, which is then a link to the photo page
It's for incorporating on my own web site, so the feed should be of my own most recent photos, of course.
Regarding the standard RSS and the badge function:
I know the official standard RSS works kinda like this, but I don't want the "Mikkel Elbech posted a photo", nor the attached description of the photo.
I also know that the badge can deliver the photo in a small size, but there are two issues:
1) There is no photo title, and I'd really, really like that.
2) It only occasionally shows the most recent photo. Typically it shows the third most recent.
(I don't have an API key, so I'm hoping that either this already exists, or it can be very easily programmed by someone with a key and the right skills.)
Any help will be highly appreciated! :)
Kind regards,
Mikkel Elbech
Originally posted at 10:57AM, 10 May 2008 PDT
(
permalink
)
Mikkel Elbech edited this topic 2 months ago.
|
 |
Whay can't you retrieve the standard feed and use just the fields you want?´You have all you want in the "media:" elements.
Posted 2 months ago.
(
permalink
)
|
 |
Um... I'm not sure...
But it sounds like it's not hard to do! Could I get you to elaborate on this solution a little? Like, how do I "use" those fields, and how is it practically done? :)
Originally posted 2 months ago.
(
permalink
)
Mikkel Elbech edited this topic 2 months ago.
|
 |
Alright, I had a go at it, and I've got this code (from a free RSS script), where the "title" element gets assigned to the "strChannelTitle" variable, "description" to "strChannelDescription", etc.:
-----
for each entry in channelNodes
if entry.tagName = "title" then
strChannelTitle = entry.text
elseif entry.tagName = "description" then
strChannelDescription = entry.text
elseif entry.tagName = "link" then
strChannelLink = entry.text
end if
next
-----
I've then tried this code for assigning the URL of the thumbnail, but it doesn't work:
-----
elseif entry.tagName = "media:thumbnail/@url" then
strChannelThumbnail = entry.text
-----
Any clue what I should write there instead of "media:thumbnail/@url"?
Thanks a lot in advance! :)
Mikkel
Posted 2 months ago.
(
permalink
)
|
 |
Well ... get the feed and parse it as any other piece of XML; that's all. Then use the elements you need and discard the rest.
For example, you can get from media:content the URI, mime type, height and width of the small (240px) image; from media:title the title and from media:description the description. Other elements will give you other things; like link the link to the photo page, etc.
Feeds are full of all type of info but nothing forces you to use it all.
edit: Typos
re-edit: I've been too slow :-)
I fear the code is up to you, sorry. However, it should be easy if you know how to address each element and its properties.
Originally posted 2 months ago.
(
permalink
)
Silly Luis edited this topic 2 months ago.
|
 |
Yes, okay. I understand that these things are retrievable.
But I don't know how to do it using regular ASP code. That's where I get stuck...
Like, how do I "call" it? I guess I don't know how to parse XML very well.
Posted 2 months ago.
(
permalink
)
|
 |
Yeah ok... I'll try figuring it out. If anyone else reads this and can help, please do! :)
And thanks for your help so far, Luis :)
Originally posted 2 months ago.
(
permalink
)
Mikkel Elbech edited this topic 2 months ago.
|
 |
I can't be sure (I know nothing of ASP) but the fail is probably in the way of dealing with attributes inside a tag?
I can't help you with ASP, that's out of my K-sphere (I'll give a look to the Patform SDK, though, just in case :-)
Originally posted 2 months ago.
(
permalink
)
Silly Luis edited this topic 2 months ago.
|
 |
Cool, thanks... And yeah, I think you're right. Odd that it's so difficult! :P
Posted 2 months ago.
(
permalink
)
|
 |
Mikkel Elbech, have a look at the Flickr Pipes group…
Posted 2 months ago.
(
permalink
)
|
 |
I peeked... What thread specifically? :)
Posted 2 months ago.
(
permalink
)
|
 |
Any help, anyone? :)
Posted 2 months ago.
(
permalink
)
|
Would you like to comment?
Sign up for a free account, or sign in (if you're already a member).
|
|