|
||
API Developer's Guide Open API Google Groups |
1. Regent Seven Seas Cruises We recently used SharedBook's API to give the passengers of Regent Seven Seas Cruises more flexibility in creating their books from the 2007 European and Mediterranean and the Alaskan sailings. You can go to http://regent.sharedbook.com to see how the application works. All you have to do is select "Europe and Mediterranean" or "Alaska" as the destination, choose a ship, 2007 sailing, and select a previous sailing date. You will be taken to a bridge page, where you can designate a title for your book, a dedication that will appear in the front of the book, and choose your cover photo -- either the ship or your own image that you upload. You can then select the specific ports you visited on your voyage. Now, with just one click, the information that you selected will be incorporated into your book, along with additional content and photos provided by Regent. Once the PDF preview of the book is generated, you will have the option of reviewing and purchasing the book, or personalizing it further by editing the photos that have been included in the book and adding to them. You can also invite others into your personal book making space to contribute to the finished product. The application utilizes the following Open API methods:
2. Hello World You can view our Hello World application at http://api.sharedbook.com/helloworld Visit the above URL to activate the Hello World sample program which will call the following Open API methods:
Finally, "Hello World" redirects to the preview URL returned by the book/preview method. The default parameters are:
These values can be changed by altering the URL parameters, for example:
The sample Python code is available for download here, and consists of four files:
3. Template Bridge Page The Bridge Page package contains a working html bridge page with content selection. The package contains html files, a flash file, css file and images. 4. Java Bridge Page See a sample, working bridge page implemented in java. Enter a book title, chapter title, and chapter text in the appropriate fields, and the API will create a book for you. The sample Java code is available for download here. 5. Picasa to SB Java Program This is a Java program that demonstrates possible usage of the SharedBook open API. It downloads all photos from a Picasa Web Albums' album (see http://picasaweb.google.com/) and creates a new SharedBook from them. It uses the Java wrappers of both SharedBook and Picasa's GData. | |