Follow the steps in this tutorial to create a WorldCat citation-formatting application using Yahoo Pipes.
Yahoo Pipes is an easy-to-use graphical web application for combining input from various sources -- yahoo search results, xml from your applications, RSS and Atom feeds on the web -- and combine these into a single RSS Feed. Once created, the RSS Feed can be reused anywhere on the web where RSS is a good fit: on iGoogle home pages, blogs, etc.
To get started you'll need a Yahoo account. Then go to pipes.yahoo.com, logon, and click "Create a Pipe".
You'll see a blank canvas of grid lines. This is where the Pipes objects are dragged from the menu on the left-side of the screen, and connected.
To begin building this application, select a Pipes object to construct a URL for sending a request to the WorldCat Search API.
Construct a Search API URL
Open the "Url" menu, click URL Builder, and drag that over to the canvas.
Add these values to build the URL:
-- Base: http://www.worldcat.org
-- Path elements: webservices/catalog/search/worldcat/opensearch
And these Query parameters and values:
-- format: atom
After building the URL, click on the "Refresh" link in the Debugger frame below the canvas, and you should see the URL shown here.
Supply the WSKey Value
The wskey, cformat, and q URL values are supplied to the URL builder from other sources, rather than being hard-coded. The wskey (a web service key assigned to you for the Search API) will be provided from a private string stored in the Pipes application, and the cformat (citation format) and q (search terms) values will be form elements prompted in the user interface for input.
Create a private text field by opening the String menu selection, clicking on the Private String object, and dragging that to the right of the URL Builder object.
Add your wskey string to the Private String. Then click on the little dot at the base of the Private String object and drag it to the connecting dot to the right of the wskey element in the URL Builder object.
Supply User Inputs
Add user inputs for cformat and q in a similar way. Click on the "User inputs" menu, select Text input, and drag that to the right of the URL Builder. Do this twice, once for the cformat and once for the q element. Give each a name that matches the corresponding URL Builder element, a label for the user interface, a default value if needed, and a debugging element for testing. Then connect each to the corresponding element in the URL Builder, as shown in this illustration:
Fetch the API Response
Now fetch the Atom feed that should be returned by the WorldCat Search API, and get its output. Open the Sources menu and drag the Fetch Feed object below the URL Builder object. Connect its URL form input to the URL Builder output as shown here:
Send the Output
And as a final step for building the application, drag the Pipe Output object below the Fetch Feed object (it should have been automatically added to the canvas in the previous step) and connect it to the Fetch Feed ouput.
Test the Pipe
To test the application, click the Save link, give the app a name, and then select Run Pipe. Initially you should see just the user interface:
But if you enter search terms and send those, you should see a result with each items formatted in the specified citation format:
The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »
© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates