WikiWealth

07 Jul 2010 09:10 | java python wikidot

Through looking at what information is available to Wikidot API developers, you can quickly gain an understanding of what you can and can not do with the API. Therefore I've taken the time to write this blog post to explain the input and output of most of the API's methods.

If you have any questions or suggestions, you can reply to this blog post or ask on the wikidot api developer forum.

system.listMethods

Parameters ()

If your language's XML-RPC libraries require a parameter, just create an Object[] array and set it to null. Then provide that as the parameter.

Return type

This method returns an array (list in Python) of Strings. Each String is the name of a method that the API supports. Both XML-RPC system methods (like "system.listMethods" itself) and Wikidot-specific methods are included in the list.

user.sites

Parameters (user)

Create a map (dictionary in Python) and add a new entry for each parameter.

  • user - Wikidot username

Return type

This method returns an array (list in Python). Each element in the array is a map (dictionary in Python) containing the following entries:

  • title - The site title
  • name - The unix name for the site (i.e. name.wikidot.com)
  • access - The access policy (open, closed or private)

Note that the user.sites method no longer exists in the latest version of the XML-RPC API.

site.categories

Parameters (site)

Create a map (dictionary in Python) and add a new entry for each parameter.

  • site - The unix name of the site

Return type

This method returns an array (list in Python). Each element in the array is a map (dictionary in Python) containing the following entries:

  • name - The name of the category

site.pages

Parameters (site) or (site, category)

Create a map (dictionary in Python) and add a new entry for each parameter.

  • site - The unix name of the site
  • category - The name of the category (optional)

Return type

This method returns an array (list in Python). Each element in the array is a map (dictionary in Python) containing the following entries:

  • site - The unix name of the site
  • parent_page - The fullname of this page's parent
  • tag_string - A space-separated String of tags
  • date_edited - The updated_at value for the page
  • date_created - The created_at value for the page
  • title_shown - See below for a description
  • user_created - The created_by value for the page
  • category - The category that the page belongs to
  • title - See below for a description
  • name - The unix name of the page
  • user_edited - The updated_by value for the page
  • title_or_unix_name - See below for a description
  • tag_array - An array of tags (String objects I think)
  • full_name - The full name of the page. If the category is _default, 'full_name' is the same as 'name'

There are three fields for the page title:

  • title_shown - This is the title that appears when you view the page in a browser, including variables from auto-numbered categories.
  • title - The title that a user enters when creating or editing the page. If the category is not autonumbered, this is the same as 'title_shown'.
  • title_or_unix_name - If 'title' is an empty String, the page's unix name is shown instead. This is used for internal links in the web version of Wikidot.

page.get

Parameters (site, page)

Create a map (dictionary in Python) and add a new entry for each parameter.

  • site - The unix name of the site
  • page - The fullname of the page

Return type

This method returns an array (list in Python). Each element in the array is a map (dictionary in Python) containing the following entries:

  • source - The Wikidot source code for the page
  • html - The rendered HTML version of the page
  • meta - The meta information for the page. This element is not a map (dictionary in Python), but is an array containing another map (dictionary in Python) with the same entries as the map (dictionary in Python) you can get from the 'site.pages' method.

page.files

Parameters (site, page)

Create a map (dictionary in Python) and add a new entry for each parameter.

  • site - The unix name of the site
  • page - The fullname of the page

Return type

This method returns an array (list in Python). Each element in the array is a map (dictionary in Python) containing the following entries:

  • date_added - The date the file was uploaded
  • description - An automatically-generated description of the file type
  • name - The name of the file
  • mime - The file's mime type
  • comment - The comment added when the file was uploaded, if any
  • url - The URL you can use to access the file in a web browser
  • size - The size of the file in Bytes

TODO

I still need to work out the details for these methods, and will update this post as soon as I have done that:

  • page.save
  • user.valid
  • system.methodHelp
  • system.methodSignature
  • system.multicall

Other resources

You may also find the official list of API methods useful: http://developer.wikidot.com/doc:api-methods


Submit Feedback
Please rate this page based on the quality and helpfulness of the content to you.

Average 0% rating from 0 votes.

You may also be interested in…


OLD COMMENT SYSTEM (6 comments)

Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +

Add a new comment