hubermedia documentation 2015 html
Samples
Sample 1: Hotel stars
Task

Show top 10 hotels with DEHOGA star rating 1 to 3 in experience demo-dahoam

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type Hotel Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to Hotel.
q class_dehoga[1 TO 3] Search queries can be defined with the parameter Q, so that the amount of data returned is constrained. For more details see chapter Query Language - Introduction and Query Language - Prefixes. Search field class_dehoga for values 1 till 3.
limit 10 The number of returned records is limited to the specified value. Limit resultset to 10.
sort empty The result can be sorted via this parameter. See more details in the Query Language Introduction chapter. Leave sort empty, so default-sort relevance will be used.
Sample 2: Hotel with horse
Task

Fulltext search for hotels with fulltext "pferd" (horse)

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type Hotel Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to Hotel.
q Pferd Search queries can be defined with the parameter Q, so that the amount of data returned is constrained. For more details see chapter Query Language - Introduction and Query Language - Prefixes. Search field fulltext for "Pferd".
limit 10 The number of returned records is limited to the specified value. Limit resultset to 10.
Sample 3: Paging: get 3rd page with 5 items per page
Task

Get top objects from all type limited to 5 objects per page; Get 3rd page.        

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type All Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to All.
limit 5
Description

The limit parameter should be used for each query, as far as it is not a complete export, so that optimal performance is achieved.

Use the offset - parameter in order to fetch the next results.

Type
Syntax
&limit={Integer}
Samples
 Limit resultset to 5.
offset 10
Description
The result list starts from the defined offset value.

 

The offset parameter is always in conjunction with the limit parameter.

Thus, it is possible to gradually pick up the results.

This is useful for performance reasons for each implementation, in which the results are displayed page by page.

Type
Syntax
&offset={Integer}
Samples
 Start at item 10 and get 3rd page.
Sample 4: Top 10 tours with mountain
Task

Get top 10 tours of category biking that do not contain "Berger" (mountains) in fulltextsearch

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type Tour Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to Tour.
q category: Radfahren AND -Berge Search queries can be defined with the parameter Q, so that the amount of data returned is constrained. For more details see chapter Query Language - Introduction and Query Language - Prefixes. Search field category = radfahren (Biking) and fulltext not berge (mountains).
limit 10 The number of returned records is limited to the specified value. Limit resultset to 10.
Sample 5: Tours with min distance > 50 km
Task

Get tours that are longer than 50 kilometers.

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type Tour Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to Tour.
q length:[50000 TO *] Search queries can be defined with the parameter Q, so that the amount of data returned is constrained. For more details see chapter Query Language - Introduction and Query Language - Prefixes. Search field length: 50000 - *.
limit 10 The number of returned records is limited to the specified value. Limit resultset to 10.
Sample 6: Tours of type bike or hiking with distance > 5km
Task

Get tours with a distance greater than 5 kilometers thar have category radfahren (biking) or wandern (hiking).

Solution
Description

Used parameters:

Parameter Value Description
experience demo-dahoam The experience specifies the name of the project data pool to be used.  (obligatory) Use this experience to get data from eT4.META-search.
type Tour Used to specify the main content type/topic to search. Hotel, Event, Gastro, Tour, POI, City, Area, Package, Article or Web. Set type to Tour.
q length:[5000 TO *] AND category:(Radfahren OR Wandern) Search queries can be defined with the parameter Q, so that the amount of data returned is constrained. For more details see chapter Query Language - Introduction and Query Language - Prefixes. Search field length for values greater than 5000 and field category for values radfahren or wandern.
limit 10 The number of returned records is limited to the specified value. Limit resultset to 10.

Check out more samples at our API-Explorer: http://developer.et4.de/explorer/?samples=true

 

 


© hubermedia 2018 Privacy Statement Imprint