bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/0.1
12.1.2
by elof.bigestans at gmail
* Added description files for code examples. These were removed on a previous clean-up job, when they shouldn't have been. |
1 |
<span class="description"> |
2 |
<br> |
|
3 |
<div class="descriptionheading">Overview</div> |
|
4 |
||
5 |
Since no error correction is done for the bookings (i.e. it is possible to book resources that are not available at the requested date) all |
|
6 |
applications must check resource availability. This function passes a resource ID to the API which returns a set of available dates, |
|
7 |
and for each date the number of available positions and the cost for making a booking is returned. |
|
8 |
||
9 |
<div class="descriptionheading">ResultAvailability</div> |
|
10 |
<span class="interestingdescription">booking/getavailability_XML.php</span> shows the availability information for all available dates for the given resourceID. |
|
11 |
||
12 |
<br><br> |
|
13 |
||
14 |
<br><br><div class='exampleheading'>Call Example:<br><br> |
|
15 |
<pre><span class="codeexample">$.ajax({ |
|
16 |
type: 'POST', |
|
17 |
url: 'booking/getavailability_XML.php', |
|
18 |
data: { |
|
19 |
// type: escape("Hotell_Demo"), // Optional: You can specify the application? |
|
20 |
resourceID: resource |
|
21 |
}, |
|
22 |
success: ResultAvailability |
|
23 |
}); |
|
24 |
</span></pre> |
|
25 |
</div> |
|
26 |
||
27 |
<br> |
|
28 |
||
29 |
<br><div class='exampleheading'>Returned Data Example:<br> |
|
30 |
<pre><span class="codeexample"> |
|
31 |
<avail> |
|
32 |
<availability
|
|
33 |
resourceID='1008' |
|
34 |
name='The Laszlo Plaza' |
|
35 |
location='Athens' |
|
36 |
company='Laszlo Inc' |
|
37 |
size='96' |
|
38 |
cost='110' |
|
39 |
category='1' |
|
40 |
date='2001-01-01' |
|
41 |
bookingcount='0' |
|
42 |
bookingcost='28.99' |
|
43 |
bookingclass='1' |
|
44 |
remaining='96' |
|
45 |
/>
|
|
46 |
</span> |
|
47 |
||
48 |
</div> |
|
49 |
||
50 |
</span></pre> |