The API for Scripting2

  There are just a few XML-RPC entry-points.
  1. scripting2.newPost (username, password, title) returns struct
    Called when the user clicks the New Post button in the editor. The server returns two values in the struct, newPostToken and versionServer.
    newPostToken is a unique identifier. The editor must pass it back to the server the first time scripting2.savePost is called on the post. Without a correct newPostToken, the savePost call will fail.
    versionServer is returned to help in debugging. Clients can probably ignore it (but it may prove useful when new versions are released).
  2. scripting2.savePost (username, password, opmltext) returns struct
    This is the central routine in the API. It's how new posts are created and how existing posts are edited.
    All the information the server needs about the post comes from the OPML that is transmitted to it. All the information that passes back from the server is in the struct.
    The outline described by opmltext must have a single summit. If it has more than one summit all but the first are ignored.
    The attributes of the first summit provide the incoming parameters to the savePost call.
      1. created determines the official publication date of the post, thus determining where in the calendar hierarchy the post will be stored.
      2. text determines the title of the post.
      3. storySerialNum, if present, the post has already been saved, if not a serialNum is assigned and returned.
      4. newPostToken is only present if the post is new, it's ignored if the post has already been saved (i.e. it already has a serialNum). It must match a previously allocated token or else the save fails.
      5. flNotInChronology is optional, if present and true, the post is not included in the chronology of the blog. It doesn't appear on the home page, on the daily and monthly archive page. This lets you use Scripting2 to edit web pages that are not part of the weblog. Examples could include an About page or Changes page.
      6. flLiveBlog is optional, if present and true, this post is used to render the live-blog feed for the site.
      7. flVisibleSubtext is optional, if present and true, instead of the text being collapsed by default it's expanded, for this post. This is useful when sub-text is used for documentation, for example, this doc. :-)
      8. domainToMap is optional. If present the server maps requests to the indicated domain to this post. The domain should be mapped, via CNAME probably, to the machine the server software is running on. This is used for changes.scripting2.com and reallysimple.org.
    The returned structure contains the returned values.
      1. All the input parameters are included in the returned structure.
      2. url is the address of the post.
      3. ctSaves is the number of times the post has been saved.
      4. whenLastSave is the date/time when the post was last saved.
  More coming soooon. :-)