Click here to Skip to main content
15,900,424 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please someone help! I know I am overlooking something, but has anyone had any experience displaying an affiliate atom feed for homwaway in Razor using webmatrix or java. If I could only see an example I’m sure I could learn this, but I am having no luck at all finding one. Below is all the info they have on their website.

HomeAway Affiliate XML Feeds FAQ
Affiliate XML Data Feed FAQ
Getting started
The feeds that HomeAway are providing are XML atom feeds. XML (Extensible Markup Language) is a set of rules for encoding documents
electronically. It is common for XML to be used in interchanging data over the Internet. Therefore, in order to access the data you must parse the
feed.
Here are the basic steps for accessing and displaying xml feeds:
Step 1: Get the XML Feed
Step 2: Extract or Parse data from the feed
Step 3: Store data
Step 4: Display data
There are many different ways to extract or parse the data from the feed. A variety of APIs for accessing XML have been developed and used,
and some have been standardized.
Examples of pull parsers include StAX in the Java programming language, SimpleXML in PHP and System.Xml.XmlReader in the .NET
Framework. Other popular ones include the following:
FeedAPI - http://drupal.org/project/feedapi
SimplePie - http://simplepie.org/
PHP Universal Feed Parser -
http://www.ajaxray.com/blog/2008/05/02/php-universal-feed-parser-lightweight-php-class-for-parsing-rss-and-atom-feeds/
Accessing the data
The URL for accessing the Atom feed will be something like this:
https://partner.homeaway.com/aggregator/homeaway/partners/search?partnerId=cj_all&format=cjAtom&affiliateID=1. This will be the first page of
the feed.
To access the remaining pages, "walk" the feed by following the next links: <link rel="next"
href="https://partner.homeaway.com/aggregator/homeaway/partners/search?partnerId= cj_all&format=cjAtom&affiliateID=1&page=2"/>. The last
page will not have a next link. The code can thus extract information from the document as it traverses it.
You should walk the feed once a day and cache the data. The data received on a given day should replace any of the data from the day before.
For example, you may have listing 1, 2 and 3 one day, and on the next day, 1, 2, 4. In this case, you should no longer store or use listing 3. Also,
listing data may change as owners update their listings, so listings 1 and 2 should be updated in your system.
XML Feed Data
The data provided in the feeds includes the following:
Vacation Rental Name
Description of the Property
Property ID
URL of the listing at HomeAway.com
CJ Tracking URL
Image URL
Region (Country, State, Town, Zip)
Price
Currency
Period Type (Nightly – Weekly – Monthly)
Property Type (Condo, House, etc)
# of Bedrooms
# of People it Sleeps
# of Bathrooms
Hint – You can right click on the feed and ‘view source’ to see the data fields above!
Data Format
The feed is an Atom feed. Here is an example of the beginning of an Atom feed and one entry:
Listing Attributes
The listing element (the only element found in the content element) is the main data object. It has the following attributes:
systemid, propertyid, unitid - These three combined make up the unique identifier of the listing
url - the url of the listing on homeaway.com
lastmodified - The is the date/time of when the listing was last modified by the owner
thumbnailurl - This is the location of the thumbnail image
imageurl - This is the location of a larger image (same image as thumbnailurl)This image will fit into a 400x300px frame
Listing Elements
Each listing element in the feed will have the following elements
headline - same as title found in the entry. This is the headline of the listing as defined by the owner
description – same as the summary found in the entry
regions - These are the HomeAway regions (in order) of the location of the property
rates - list of rates by time period
rentalbasis - how the rate applies - the current rental bases are: property, person, room
rate from - the lower end of the price range - may be a fractional number.
rate to – the higher end of the price range
currencyunit – USD
periodtype – daily, weekly, monthly
data propertytype – the type of property – house, condo, cottage, etc.
bedrooms – number of bedrooms
sleeps – the number of people the unit sleeps
halfbathrooms – the number of half bathrooms
fullbathrooms – the number of full bathrooms
city – the city the property is located
state – the state the property is located
country – the country the property is located
postalcode – the zip code
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900