Delphi REST Clients Collection (Page 2)

Last Udpated on May 27th, 2009

This is the second page for my collection of Delphi REST Clients, partially introduced at DataRage in March 2009, and later demonstrated at the Delphi Live Conference in May in San Jose (CA). It is a set of different client applications for REST web services, all written in Delphi, using different techniques in terms of data access and data processing.

The first part of the list is at the main page of the Delphi REST Clients. This is the second part. A separate example is my TweetOfTheDay program, available on http://www.wintech-italia.com/apps/tweetoftheday/.

For each example, you can see a short description, some rationale behind the demo, how to set it up (you need a developer account, for some of the demos), an image with the screen-shot, and you can find a link to the download file (a ZIP file with the complete source code and a ready-to-use executable file).

04: YahooMaps

This programs uses Yahoo Map API at developer.yahoo.com/maps/ to get an actual map and show it in an Image control. The map is retrieved in two steps: a first HTTP call passes the address and receives the URL of the map image, which is retrieved using a second HTTP call. The data is the same from Customer.cds of the previous example, GeoLocation (included again). The images is saved to a temp file, and loaded into the control. There is a button to get the map of a hardcoded location (San Jose, as this was the Delphi Live demo).

The program requires an AppID you can obtain at the URL above, and stores in another ini file in the "user documents" folder called YahooMaps.ini, as follows:


Download: 04_YahooMaps.zip (700 KB).

05: MappingDemo and 06: DbToSheet still missing

07: Translate

This program uses Google Translate REST API to translate some text to almost any language. The documentation is at: code.google.com/apis/ajaxlanguage/documentation/.

The demo uses a specific component, invoked with a class method (the component is not placed on any form in this demo, but could). The nice thing is the support component makes the API very easy to use, and incapsulates the HTTP call completely. There is no need for a signup key (and an ini file). One should provide a referrer site, but everything seems to work even without that information. The main form has a listbox filled with all supported languages. The demo translated from English, but you can set it up on the opposite direction as well. In theory, any two language token combination works, in practice not always.

Download: 07_Translate.zip (388 KB).