User Tools

Site Tools


importing

This is an old revision of the document!


Importing XML

Importing the XML from our servers to yours can be as simple or as complex as you need. Cruise Factory currently offers two types of data download services.

Types of data services

/services/

This is a simple data service that provides the full table of data all of the time. Accessing the regular full data service by using the /services/ URL. For example:

http://feeds.cruisefactory.net/services/YOUR_KEY/get/TABLE_NAME

/increment/

This is an incremental data service that sends only updated data. Accessing the incremental data service by using the /increment/ URL. For example:

http://feeds.cruisefactory.net/increment/YOUR_KEY/get/TABLE_NAME

Incremental service differences
The increment data service is different from the regular full services due to a number of reasons.

  1. The first being the fact it is incremental as the name implies.
  2. By default it will only return rows of data that have been added or updated within the last 24 hours. This default 24 hour timeout can be changed by adding the “days” parameter to the end of your URL which is explained below.
  3. Because of its incremental nature, it includes a new element named “delete” (which contains a sub-element named “ids”). More details on the delete element below.

Incremental services days parameter
text

Incremental services delete element
This new element will include (if any) a comma seperated listing of all IDs which you must delete from your specified table. For example; if you download the dining table and have 3,5,7 in your delete element:

<delete>
	<ids>3,5,7</ids>
</delete>

Then you must delete IDs 3, 5 and 7 from your dining table that is located in your local database.

Retrieval methods

Downloading the XML is done via URLs. If you've read the types of data services section above, then you've already seen how the URLs are created. To further explain; apart from using either the /services/ or /increment/ retrieval type, you will need your secure key and the name of the table you'll be downloading. You then put them together to build the download URL, for example:

http://feeds.cruisefactory.net/increment/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5/get/specials

The above URL will download the specials table from the incremental data service with only the last 24 hours of updates/additions.

Importing into your database

importing.1356924879.txt.gz · Last modified: 2012/12/31 14:34 by cruisefactory