OSDN Git Service

3.15 taka-san version
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / documentation / devdocs / xmlrpc.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
2 <html xmlns="http://www.w3.org/1999/xhtml">\r
3 <head>\r
4         <title>Nucleus - XML-RPC Interface</title>\r
5         <link rel="stylesheet" type="text/css" href="styles/manual.css" />\r
6 </head>\r
7 <body>\r
8 \r
9 <div class="heading">\r
10 XML-RPC Interface\r
11 </div>\r
12 \r
13 <h1>Introduction</h1>\r
14 \r
15 <p>\r
16 <a href="index.html">Back to the developer docs index</a>\r
17 </p>\r
18 \r
19 <p>\r
20 This document contains information on the XML-RPC interface that Nucleus provides, and the <a href="#errorcodes">error messages</a> it spits out. Please note that the specification of this interface might still undergo changes in the future.\r
21 </p>\r
22 \r
23 <div class="note">\r
24 The URL for the Nucleus XML-RPC interface is:\r
25 <br />\r
26 <b>http://www.yourserver.com/yourpath/nucleus/xmlrpc/server.php</b>\r
27 </div>\r
28 \r
29 <a name="bloggerApi" id="bloggerApi"></a>\r
30 <h1>The Blogger API (XML-RPC)</h1>\r
31 \r
32 <p>\r
33 Nucleus implements the <a href="http://plant.blogger.com/api/">Blogger API</a>. This allows for tools and services that can communicate with Blogger, to be able to also communicate with Nucleus. Because the way Nucleus works, some interpretations of parameters are slightly different, see the notes below for more info. The structure of method calls and responses are, of course, exactly the same as the methods at Blogger.\r
34 </p>\r
35 \r
36 <p>\r
37 Here's the list of available methods. Click them to get more information (links go to either the Blogger API or the <a href="http://groups.yahoo.com/group/bloggerDev">Blogger API Mailinglist</a>).\r
38 </p>\r
39 \r
40 <ul>\r
41         <li><b><a href="http://plant.blogger.com/api/xmlrpc_newPost.html">blogger.newPost</a></b></li>\r
42         <li><b><a href="http://plant.blogger.com/api/xmlrpc_editPost.html">blogger.editPost</a></b></li>\r
43         <li><b><a href="http://groups.yahoo.com/group/bloggerDev/message/296">blogger.getPost</a></b></li>\r
44         <li><b><a href="http://groups.yahoo.com/group/bloggerDev/message/147">blogger.deletePost</a></b></li>\r
45         <li><b><a href="http://plant.blogger.com/api/xmlrpc_getUsersBlogs.html">blogger.getUsersBlogs</a></b></li>\r
46         <li><b><a href="http://groups.yahoo.com/group/bloggerDev/message/225">blogger.getRecentPosts</a></b></li>\r
47         <li><b><a href="http://groups.yahoo.com/group/bloggerDev/message/315">blogger.getUserInfo</a></b></li>\r
48         <li><b><a href="http://plant.blogger.com/api/xmlrpc_getTemplate.html">blogger.getTemplate</a></b></li>\r
49         <li><b><a href="http://plant.blogger.com/api/xmlrpc_setTemplate.html">blogger.setTemplate</a></b></li>\r
50 </ul>\r
51 \r
52 \r
53 <p>\r
54 Since Nucleus is structured somewhat differently inside, there are some differences in the way parameters are handled. An overview:\r
55 </p>\r
56 \r
57 <ul>\r
58         <li>Appkeys are ignored.</li>\r
59         <li>Next to the body of a post, a Nucleus-item also has a title and a category. Blogger only has the body (known as 'contents'). To be able to use the extra parts, you can use <tt>&lt;title&gt;</tt> and <tt>&lt;category&gt;</tt> in the contents you send to Nucleus. These tags are only added in the getRecentPosts call</li>\r
60         <li>What is known under Blogger as 'templates', is known under Nucleus as 'skins'. There can be more than one skin on the system, and each skin can be used by different blogs. The blogger.setTemplate and blogger.getTemplate methods will affect the default skin for the chosen blog, as selected in the Nucleus blog settings. The 'main' and 'archiveIndex' template types refer to the nucleus skinparts 'index' and 'archivelist'</li>\r
61         <li>The <tt>publish</tt> parameter is used to determine wether a new post is to be added as a draft or not. When using <tt>blogger.editPost</tt>, the <tt>publish</tt> parameter is ignored unless it turns a draft into a published item</li>\r
62         <li>When using the <tt>getUserInfo</tt> call, the 'lastname' in the result will be empty and 'firstname' will contain the full name. This is because Nucleus does not make a difference between first name and last name</li>\r
63         <li>The <tt>getRecentPostst</tt>-method returns <tt>authorName</tt> and <tt>title</tt> as extra parameters. Blogger has been returning these also (although undocumented)</li>\r
64 </ul>\r
65 \r
66 <a name="metaWeblogApi" id="metaWeblogApi"></a>\r
67 <h1><a name="metaweblog"></a>metaWeblog API</h1>\r
68 \r
69 <p>\r
70 Since v1.1, Nucleus also supports the <a href="http://www.xmlrpc.com/metaWeblogApi">metaWeblog API</a>, which is an extention to the Blogger API. \r
71 </p>\r
72 \r
73 <p>In Nucleus v2.5, support was added for the <code>newMediaObject</code> and <code>getRecentPosts</code> methods as well (they weren't in the original metaWeblog specification)</p>\r
74 \r
75 <p>\r
76 A list of available methods is listed below (see the <a href="http://www.xmlrpc.com/metaWeblogApi">specification</a> for more info):\r
77 </p>\r
78 \r
79 <ul>\r
80         <li>metaWeblog.newPost</li>\r
81         <li>metaWeblog.editPost</li>    \r
82         <li>metaWeblog.getPost</li>     \r
83         <li>metaWeblog.getCategories</li>       \r
84         <li>metaWeblog.newMediaObject (v2.5)</li>\r
85         <li>metaWeblog.getRecentPosts (v2.5)</li>       \r
86 </ul>\r
87 \r
88 <a name="mtApi" id="mtApi"></a>\r
89 <h1>Movable Type API</h1>\r
90 \r
91 <p>Since v2.5, Nucleus supports the methods from the <a href="http://www.movabletype.org/docs/mtmanual_programmatic.html">Movable Type API</a>.</p>\r
92 \r
93 <p>The list of available methods is listed below:</p>\r
94 \r
95 <ul>\r
96         <li>mt.supportedMethods</li>\r
97         <li>mt.supportedTextFilters</li>\r
98         <li>mt.publishPost</li>\r
99         <li>mt.getCategoryList</li>\r
100         <li>mt.getPostCategories</li>\r
101         <li>mt.setPostCategories</li>\r
102         <li>mt.getRecentPostTitles</li>\r
103         <li>mt.getTrackbackPings</li>\r
104 </ul>\r
105 \r
106 <p>Some notes:</p>\r
107 \r
108 <ul>\r
109         <li>Nucleus only supports one category for each item. This means that all categories except the 'primary' category for an item will be ignored.</li>\r
110         <li>Trackback is not implemented in the Nucleus core (it's avalailable as a plugin instead). Because of this, <code>mt.getTrackbackPings</code> will return an empty array by default.</li>\r
111         <li>Nucleus doesn't have text filters, so <code>mt.getSupportedTextFilters</code> returns an empty array.</li>\r
112 </ul>\r
113 \r
114 <h1><a name="errorcodes"></a>Error Codes</h1>\r
115 \r
116 <p>\r
117 Below is an overview of the types of errors you can get back from the methods:\r
118 </p>\r
119 \r
120 <table>\r
121         <tr>\r
122                 <th>Error Code</th>\r
123                 <th>Error Message</th>\r
124         </tr>\r
125         <tr>\r
126                 <td>801</td>\r
127                 <td>Login Error (probably bad username/password combination)</td>\r
128         </tr>\r
129         <tr>\r
130                 <td>802</td>\r
131                 <td>No Such Blog</td>\r
132         </tr>\r
133         <tr>\r
134                 <td>803</td>\r
135                 <td>Not a Team Member</td>\r
136         </tr>\r
137         <tr>\r
138                 <td>804</td>\r
139                 <td>Cannot add Empty Items</td>\r
140         </tr>\r
141         <tr>\r
142                 <td>805</td>\r
143                 <td>Amount parameter must be in range 1..20 (<i>getRecentItems</i>)</td>\r
144         </tr>\r
145         <tr>\r
146                 <td>806</td>\r
147                 <td>No Such Item</td>\r
148         </tr>\r
149         <tr>\r
150                 <td>807</td>\r
151                 <td>Not Allowed to Alter Item</td>\r
152         </tr>\r
153         <tr>\r
154                 <td>808</td>\r
155                 <td>Invalid media type</td>\r
156         </tr>   \r
157         <tr>\r
158                 <td>809</td>\r
159                 <td>File is too large (max. upload filesize)</td>\r
160         </tr>           \r
161         <tr>\r
162                 <td>810</td>\r
163                 <td>Other error on newMediaObject (message will contain more info about what happened)</td>\r
164         </tr>\r
165         <tr>\r
166                 <td><i>other codes &lt; 100</i></td>\r
167                 <td>Errors encountered by the Useful Inc. XML-RPC implementation</td>\r
168         </tr>\r
169         <tr>\r
170                 <td><i>other codes &gt; 100</i></td>\r
171                 <td>Errors encountered by the XML parser</td>\r
172         </tr>\r
173 \r
174 \r
175 </table>\r
176 \r
177 </body>\r
178 </html>