cvs: peardoc /en/guide/migrating/channels xmlrpcfunctions.xml
| From: | Greg Beaver | Date: | Tue, 29 Mar 2005 04:53:43 +0000 |
| Subject: | cvs: peardoc /en/guide/migrating/channels xmlrpcfunctions.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5814@lists.php.net to get a copy of this message | ||
cellog Mon Mar 28 23:53:43 2005 EDT
Modified files:
/peardoc/en/guide/migrating/channels xmlrpcfunctions.xml
Log:
finish docs on xml-rpc functions required to operate a channel
http://cvs.php.net/diff.php/peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml diff -u peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.4 peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.5 --- peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.4 Mon Mar 28 23:04:55 2005 +++ peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml Mon Mar 28 23:53:40 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="guide.migrating.channels.xmlrpcfunctions"> <refnamediv> <refname>XML-RPC functions</refname> @@ -6,10 +6,6 @@ </refnamediv> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.intro"> <title>What XML-RPC functions are available in a standard channel?</title> - <warning> - <title>Incomplete documentation</title> - <para>Documentation is not yet complete</para> - </warning> <para> A standard PEAR channel should support this list of XML-RPC functions: </para> @@ -330,25 +326,348 @@ <refsect1 id="guide.migrating.channels.xmlrpcfunctions.info"> <title>package.info</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>false|struct <function>package.info</function></funcdef> + <paramdef>string <parameter>package</parameter></paramdef> + <paramdef>string <parameter><optional>field = null</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>package</parameter> + </term> + <listitem> + <para> + Package name to retrieve information about + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + string <parameter>package</parameter> + </term> + <listitem> + <para> + specific field to retrieve information about. If null, this should return an + array with this indices, although others could be set as well: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +<?php +array( + 'name' => 'package name', + 'category' => 'category name', + 'license' => 'package license', + 'summary' => 'package summary', + 'description' => 'package description', + 'releases' => + array( // all releases indexed by version + '0.1' => + array( + 'license' => 'release license', + 'summary' => 'release summary', + 'description' => 'release description', + 'releasedate' => 'date of release', + 'releasenotes' => 'release notes', + 'state' => 'release stability', + // the next index is optional + 'deps' => + array( + array( // release dependencies of latest release + 'type' => 'dep type from package.xml <dep>', + 'relation' => 'rel from package.xml <dep>', + 'version' => 'version from package.xml <dep>, or empty string', + 'name' => 'name from package.xml <dep>', + 'optional' => 'yes or no', + ), + // and so on with all deps + ), + ), + // and so on with all releases + // releases should be ordered by releasedate DESC + ), +); +?> + ]]> + </programlisting> + </para> + <para> + The second parameter, if set, must be one of these choices: + </para> + <para> + <itemizedlist> + <listitem> + <para> + authors - a current list of package maintainers in format: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +<?php +array( + 'handle1' => + array( + 'name' => 'Maintainer Name', + 'email' => 'maintainer@example.com', + 'role' => 'role from package.xml (lead, developer, contributor, helper)', + ), + 'handle2' => + array( + 'name' => 'Maintainer Name 2', + 'email' => 'maintainer2@example.com', + 'role' => 'role from package.xml (lead, developer, contributor, helper)', + ), + // etc. +); +?> + ]]> + </programlisting> + </para> + </listitem> + <listitem> + <para> + category - the category this package is in + </para> + </listitem> + <listitem> + <para> + description - the description of the latest release + </para> + </listitem> + <listitem> + <para> + license - package license of latest release + </para> + </listitem> + <listitem> + <para> + notes - release notes of the latest release + </para> + </listitem> + <listitem> + <para> + releases - an array of the format documented above, containing information + on all releases + </para> + </listitem> + <listitem> + <para> + summary - summary from latest release + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.listall"> <title>package.listAll</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listAll</function></funcdef> + <paramdef>bool <parameter><optional>released_only = true</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>stable_only = true</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + bool <parameter>released_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>stable_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no stable releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that match the + constraints defined above: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'name' => 'packagename', + 'category' => 'category name', + 'license' => 'release license', + 'summary' => 'package summary', + 'description' => 'package description', + 'stable' => 'latest release version that matches constraints', + 'unstable' => 'latest unstable release version or false if stable_only', + 'state' => 'release state of latest release that matches constraints', + 'deps' => + array( // same format as for package.info + ) + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.listlatestreleases"> <title>package.listLatestReleases</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listLatestReleases</function></funcdef> + <paramdef>string <parameter><optional>state = ''</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>state = ''</parameter> + </term> + <listitem> + <para> + If '', then the newest release will be returned for all packages. Otherwise, it + must be one of 'snapshot', 'devel', 'alpha', 'beta', or 'stable', and the function + should return the newest release that is more stable than state. + </para> + <para> + If state is 'beta', then the function should return the latest release that is + beta or stable. If state is 'devel', the function should return the latest release + that is devel, alpha, beta, or stable, and so on. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that have a release + within the constraint defined by the "state" parameter: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'package' => 'packagename', + 'version' => 'release version', + 'state' => 'release stability', + 'filesize' => 'size of the .tgz file to download', + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.search"> <title>package.search</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listAll</function></funcdef> + <paramdef>string <parameter>fragment</parameter></paramdef> + <paramdef>string|bool <parameter><optional>summary = false</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>released_only = true</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>stable_only = true</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>fragment</parameter> + </term> + <listitem> + <para> + A text fragment to use when searching for packages by name + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + string|bool <parameter>summary = &false;</parameter> + </term> + <listitem> + <para> + If set to false, this should be ignored. Otherwise, this should be used to + search through the summaries of packages that match the first parameter to limit + the list of returned packages. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>released_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>stable_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no stable releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that match the + constraints defined above: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'name' => 'packagename', + 'category' => 'category name', + 'license' => 'release license', + 'summary' => 'package summary', + 'description' => 'package description', + 'stable' => 'latest release version that matches constraints', + 'unstable' => 'latest unstable release version or false if stable_only', + 'state' => 'release state of latest release that matches constraints', + 'deps' => + array( // same format as for package.info + ) + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> </refentry>
http://cvs.php.net/diff.php/peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml diff -u peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.4 peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.5 --- peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml:1.4 Mon Mar 28 23:04:55 2005 +++ peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml Mon Mar 28 23:53:40 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="guide.migrating.channels.xmlrpcfunctions"> <refnamediv> <refname>XML-RPC functions</refname> @@ -6,10 +6,6 @@ </refnamediv> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.intro"> <title>What XML-RPC functions are available in a standard channel?</title> - <warning> - <title>Incomplete documentation</title> - <para>Documentation is not yet complete</para> - </warning> <para> A standard PEAR channel should support this list of XML-RPC functions: </para> @@ -330,25 +326,348 @@ <refsect1 id="guide.migrating.channels.xmlrpcfunctions.info"> <title>package.info</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>false|struct <function>package.info</function></funcdef> + <paramdef>string <parameter>package</parameter></paramdef> + <paramdef>string <parameter><optional>field = null</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>package</parameter> + </term> + <listitem> + <para> + Package name to retrieve information about + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + string <parameter>package</parameter> + </term> + <listitem> + <para> + specific field to retrieve information about. If null, this should return an + array with this indices, although others could be set as well: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +<?php +array( + 'name' => 'package name', + 'category' => 'category name', + 'license' => 'package license', + 'summary' => 'package summary', + 'description' => 'package description', + 'releases' => + array( // all releases indexed by version + '0.1' => + array( + 'license' => 'release license', + 'summary' => 'release summary', + 'description' => 'release description', + 'releasedate' => 'date of release', + 'releasenotes' => 'release notes', + 'state' => 'release stability', + // the next index is optional + 'deps' => + array( + array( // release dependencies of latest release + 'type' => 'dep type from package.xml <dep>', + 'relation' => 'rel from package.xml <dep>', + 'version' => 'version from package.xml <dep>, or empty string', + 'name' => 'name from package.xml <dep>', + 'optional' => 'yes or no', + ), + // and so on with all deps + ), + ), + // and so on with all releases + // releases should be ordered by releasedate DESC + ), +); +?> + ]]> + </programlisting> + </para> + <para> + The second parameter, if set, must be one of these choices: + </para> + <para> + <itemizedlist> + <listitem> + <para> + authors - a current list of package maintainers in format: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +<?php +array( + 'handle1' => + array( + 'name' => 'Maintainer Name', + 'email' => 'maintainer@example.com', + 'role' => 'role from package.xml (lead, developer, contributor, helper)', + ), + 'handle2' => + array( + 'name' => 'Maintainer Name 2', + 'email' => 'maintainer2@example.com', + 'role' => 'role from package.xml (lead, developer, contributor, helper)', + ), + // etc. +); +?> + ]]> + </programlisting> + </para> + </listitem> + <listitem> + <para> + category - the category this package is in + </para> + </listitem> + <listitem> + <para> + description - the description of the latest release + </para> + </listitem> + <listitem> + <para> + license - package license of latest release + </para> + </listitem> + <listitem> + <para> + notes - release notes of the latest release + </para> + </listitem> + <listitem> + <para> + releases - an array of the format documented above, containing information + on all releases + </para> + </listitem> + <listitem> + <para> + summary - summary from latest release + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.listall"> <title>package.listAll</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listAll</function></funcdef> + <paramdef>bool <parameter><optional>released_only = true</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>stable_only = true</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + bool <parameter>released_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>stable_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no stable releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that match the + constraints defined above: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'name' => 'packagename', + 'category' => 'category name', + 'license' => 'release license', + 'summary' => 'package summary', + 'description' => 'package description', + 'stable' => 'latest release version that matches constraints', + 'unstable' => 'latest unstable release version or false if stable_only', + 'state' => 'release state of latest release that matches constraints', + 'deps' => + array( // same format as for package.info + ) + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.listlatestreleases"> <title>package.listLatestReleases</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listLatestReleases</function></funcdef> + <paramdef>string <parameter><optional>state = ''</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>state = ''</parameter> + </term> + <listitem> + <para> + If '', then the newest release will be returned for all packages. Otherwise, it + must be one of 'snapshot', 'devel', 'alpha', 'beta', or 'stable', and the function + should return the newest release that is more stable than state. + </para> + <para> + If state is 'beta', then the function should return the latest release that is + beta or stable. If state is 'devel', the function should return the latest release + that is devel, alpha, beta, or stable, and so on. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that have a release + within the constraint defined by the "state" parameter: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'package' => 'packagename', + 'version' => 'release version', + 'state' => 'release stability', + 'filesize' => 'size of the .tgz file to download', + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.search"> <title>package.search</title> <para> - hi + <funcsynopsis> + <funcprototype> + <funcdef>struct <function>package.listAll</function></funcdef> + <paramdef>string <parameter>fragment</parameter></paramdef> + <paramdef>string|bool <parameter><optional>summary = false</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>released_only = true</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>stable_only = true</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + </para> + <para> + <variablelist> + <varlistentry> + <term> + string <parameter>fragment</parameter> + </term> + <listitem> + <para> + A text fragment to use when searching for packages by name + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + string|bool <parameter>summary = &false;</parameter> + </term> + <listitem> + <para> + If set to false, this should be ignored. Otherwise, this should be used to + search through the summaries of packages that match the first parameter to limit + the list of returned packages. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>released_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + bool <parameter>stable_only = &true;</parameter> + </term> + <listitem> + <para> + If &true;, then packages that have no stable releases should not be returned in the + listing of available packages + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + This function should return an array of this format for all packages that match the + constraints defined above: + </para> + <para> + <programlisting role="php"> + <![CDATA[ +array( + array( + 'name' => 'packagename', + 'category' => 'category name', + 'license' => 'release license', + 'summary' => 'package summary', + 'description' => 'package description', + 'stable' => 'latest release version that matches constraints', + 'unstable' => 'latest unstable release version or false if stable_only', + 'state' => 'release state of latest release that matches constraints', + 'deps' => + array( // same format as for package.info + ) + ), + // etc. +); + ]]> + </programlisting> </para> </refsect1> </refentry>