[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/xmlsrv/ -> xmlrpc.php (sommaire)

XML-RPC APIs This file implements the following XML-RPC remote procedures, to be called by remote clients: - the B2 API for b2evo (this is used by w.bloggar for example...) - the BLOGGER API for b2evo, see {@link http://www.blogger.com/developers/api/1_docs/} - Metaweblog API - Movable Type API (partial)

Copyright: (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
Version: $Id: xmlrpc.php,v 1.139 2007/06/27 02:23:32 fplanque Exp $
Poids: 2421 lignes (81 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 25 fonctions

  logIO()
  starify()
  b2newpost()
  b2getcategories()
  b2_getPostURL()
  bloggernewpost()
  bloggereditpost()
  bloggerdeletepost()
  bloggergetusersblogs()
  bloggergetuserinfo()
  bloggergetpost()
  bloggergetrecentposts()
  bloggergettemplate()
  bloggersettemplate()
  mwnewMediaObject()
  mwnewpost()
  mt_setPostCategories()
  mt_getPostCategories()
  mt_getCategoryList()
  mweditpost()
  mwgetcats()
  metawebloggetrecentposts()
  mwgetpost()
  _b2_or_mt_get_categories()
  _mw_get_cat_IDs()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

logIO($io,$msg)   X-Ref
Used for logging, only if {@link $debug_xmlrpc_logging} is true

return: boolean Have we logged?

starify( $string )   X-Ref
Returns a string replaced by stars, for passwords.

param: string the source string
return: string same length, but only stars

b2newpost($m)   X-Ref
b2.newPost. Adds a post, blogger-api like, +title +category +postdate.

b2 API

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

b2getcategories( $m )   X-Ref
b2.getCategories

B2 API

Gets also used for mt.getCategoryList. Is this correct?

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

b2_getPostURL($m)   X-Ref
b2.getPostURL

B2 API

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggernewpost( $m )   X-Ref
blogger.newPost makes a new post to a designated blog.

BLOGGER API

Optionally, will publish the blog after making the post. (In b2evo, this means the
new post will be in 'published' state).
On success, it returns the unique ID of the new post (usually a seven-digit number
at this time).
On error, it will return some error message.

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggereditpost($m)   X-Ref
blogger.editPost changes the contents of a given post.

Optionally, will publish the blog the post belongs to after changing the post.
(In b2evo, this means the changed post will be moved to published state).
On success, it returns a boolean true value.
On error, it will return a fault with an error message.

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggerdeletepost($m)   X-Ref
blogger.editPost deletes a given post.

This API call is not documented on
{@link http://www.blogger.com/developers/api/1_docs/}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggergetusersblogs($m)   X-Ref
blogger.getUsersBlogs returns information about all the blogs a given user is a member of.

Data is returned as an array of <struct>'s containing the ID (blogid), name (blogName),
and URL (url) of each blog.

Non official: Also return a boolean stating wether or not the user can edit th eblog templates
(isAdmin).

see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getUsersBlogs.html}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response, an array of <struct>'s containing for each blog:

bloggergetuserinfo($m)   X-Ref
blogger.getUserInfo returns returns a struct containing user info.

Data returned: userid, firstname, lastname, nickname, email, and url.

see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getUserInfo.html}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response, a <struct> containing:

bloggergetpost($m)   X-Ref
blogger.getPost retieves a given post.

This API call is not documented on
{@link http://www.blogger.com/developers/api/1_docs/}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggergetrecentposts( $m )   X-Ref
blogger.getRecentPosts retieves X most recent posts.

This API call is not documented on
{@link http://www.blogger.com/developers/api/1_docs/}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggergettemplate($m)   X-Ref
blogger.getTemplate returns text of the main or archive index template for a given blog.

Currently, in b2evo, this will return the templates of the 'custom' skin.

see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getTemplate.html}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

bloggersettemplate( $m )   X-Ref
blogger.setTemplate changes the template for a given blog.

Can change either main or archive index template.

Currently, in b2evo, this will change the templates of the 'custom' skin.

see {@link http://www.blogger.com/developers/api/1_docs/xmlrpc_getTemplate.html}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

mwnewMediaObject($m)   X-Ref
Pas de description

mwnewpost($m)   X-Ref
mw.newPost

mw API
Tor 2004

NB! (Tor Feb 2005) status in metaweblog API speak dictates whether static html files are generated or not, so fairly misleading

mt_setPostCategories($m)   X-Ref
Pas de description

mt_getPostCategories($m)   X-Ref
Pas de description

mt_getCategoryList($m)   X-Ref
Provides mt.getCategoryList


mweditpost($m)   X-Ref
mw.EditPost (metaWeblog.editPost)

mw API

Tor - TODO
- Sort out sql select with blog ID
- screws up posts with multiple categories
partly due to the fact that Movable Type calls to this API are different to Metaweblog API calls when handling categories.

mwgetcats( $m )   X-Ref
metaWeblog.getCategories


metawebloggetrecentposts( $m )   X-Ref
Pas de description

mwgetpost($m)   X-Ref
metaweblog.getPost retieves a given post.

This API call is not documented on
{@link http://www.blogger.com/developers/api/1_docs/}

param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

_b2_or_mt_get_categories( $type, $m )   X-Ref
Helper for {@link b2getcategories()} and {@link mt_getPostCategories()}, because they differ
only in the "categoryId" case ("categoryId" (b2) vs "categoryID" (MT))

param: string Type, either "b2" or "mt"
param: xmlrpcmsg XML-RPC Message
return: xmlrpcresp XML-RPC Response

_mw_get_cat_IDs($contentstruct, $blog_ID, $empty_struct_ok = false)   X-Ref

param: array struct
param: integer blog ID
param: boolean Return empty array (instead of error), if no cats given in struct?
return: array|xmlrpcresp A list of category IDs or xmlrpcresp in case of error.



Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics