cvs: peardoc /en/package/webservices/services-yahoo examples.xml
| From: | Martin Jansen | Date: | Mon, 18 Apr 2005 18:21:48 +0000 |
| Subject: | cvs: peardoc /en/package/webservices/services-yahoo examples.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5936@lists.php.net to get a copy of this message | ||
mj Mon Apr 18 14:21:48 2005 EDT
Modified files:
/peardoc/en/package/webservices/services-yahoo examples.xml
Log:
* Added note about Exceptions.
* Added quick note about how to use searches different than Web search.
* Added explanation for the spelling suggestion feature.
http://cvs.php.net/diff.php/peardoc/en/package/webservices/services-yahoo/examples.xml?r1=1.1&r2=1.2&ty=u
Index: peardoc/en/package/webservices/services-yahoo/examples.xml
diff -u peardoc/en/package/webservices/services-yahoo/examples.xml:1.1
peardoc/en/package/webservices/services-yahoo/examples.xml:1.2
--- peardoc/en/package/webservices/services-yahoo/examples.xml:1.1 Mon Apr 18 14:11:24 2005
+++ peardoc/en/package/webservices/services-yahoo/examples.xml Mon Apr 18 14:21:46 2005
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="package.webservices.services-yahoo.examples">
<refnamediv>
<refname>Examples</refname>
@@ -21,6 +21,14 @@
Analysis</link>.
</para>
+ <para>
+ All public methods in <classname>Services_Yahoo</classname> have in
+ common that <ulink
+ url="http://php.net/manual/en/language.exceptions.php">exceptions</ulink>
+ will be raised when something goes wrong. This is why <literal>try {
+ ... } catch { }</literal> blocks are wrapped around all examples.
+ </para>
+
<note>
<para>
The examples are designed to be run from a command line shell. If
@@ -156,6 +164,15 @@
</para>
</example>
+ <note>
+ <para>
+ In order to query the Image, News, Video or Local search, one only
+ needs to replace the argument <quote>web</quote> in the call of the
+ <function>factory</function> method with one of
+ <quote>image</quote>, <quote>news</quote>,
<quote>video</quote>, or
+ <quote>local</quote>.
+ </para>
+ </note>
</refsect1>
@@ -217,6 +234,12 @@
The Spelling Suggestion service provides a suggested spelling
correction for a given term.
</para>
+ <para>
+ The following code queries Yahoo for a spelling suggestion for the
+ term <quote>madnna</quote>. The service will return exactly one
+ result, but currently there is no way to avoid looping through the
+ <varname>$results</varname>.
+ </para>
<programlisting role="php">
<![CDATA[