There are several XML generators (called "tickers") on PerlMonks to help people who write scripts accessing information on PerlMonks. Here is a list of them, with some of the parameters documented.
For tickers that require a login, either provide a login cookie or perform a login as part of the URL. You may also add ticker=yes to the URL if you wish to stay out of the list of Other Users. (op=login;user=username;passwd=password;ticker=yes)
As with all PerlMonks request URLs, parameters are semicolon separated.
Default Parameters: Almost all nodes can be viewied directly in XML by using node_id=XXXX;displaytype=xml. Almost all XML feeds can have their XML modified by the 'xmlstyle' parameter. This parameter may be present multiple times and will respect 'flat' and 'clean' as default types, some feeds may also provide additional types.
Returns current chatterbox content. Defaults to presenting the 'new' xml format, but you can use xmlstyle=old or xmlstyle=modern to access the other styles. Other options are the limit=N and the timeout=S parameters, which can be used to control the number of records returned and the timeframe the records cover. S is a count of seconds where 0 < S <= 600. The fromid=ID parameter can be used to fetch all new records since a particular message (so long as they were posted within timeout seconds). IOW, the fromid automatically disables the limit parameter. It is recommended that new clients use the 'fromid' parameter (use the last message id from the previous fetch) and the modern style as this combination is the easiest work with and the lowest load on our servers. (With the modern style all timestamps are in GMT and the feed includes both parsed and unparsed data.) Note: if the user is logged in when doing a fetch the users /ignore settings are respected.
This ticker is identical to New Chatterbox XML Ticker, above, except that the default xmlstyle is 'old'. As such, it is deprecated for new clients.
Returns private and archived messages. Supports since_id, prior_to, xmlstyle, archived, and max_recs parameters. Please see the change announcement for details. Requires a login and does not generate XML for Anonymous Monk. Note that this ticker deals in EST, not GMT. (EST = GMT - 5.)
Call it with ;op=message;message=text of message.
It will return a plain text response: Chatter accepted.
(If the request was malformed in some way, the response will be No chatter to send.)
send chatter can be asked to return XML using the normal displaytype=xml parameter, and respects the normal xmlstyle settings. Of interest in the response will be the send_chatter_result element which may contain any one of error, response or accepted elements which in turn should contain further HTML information about what has occurred. Experimentation is recommended as this is a new feature that is subject to possible change and improvement. (Until this notice is changed.)
Returns title, date, reputation, etc. of a user's nodes. If the "reputation" field is not required, foruser=userNameOrID can be used, which avoids requiring a login. Otherwise returns information about nodes by the logged-in user (or by Anonymous Monk if no login). By default returns the oldest 500 nodes written by the author in order of node_id. Possible options are offset=N, limit=N and order=(asc|desc), where 0 < N <= 500. Also accepts the "fromid" parameter, which allows you to fetch new stuff since an intitial pass. The idea being to build a local DB of this information to avoid refetching the full list every time.
Returns reputation information about recently voted on nodes owned by the logged in user. Returns those nodes voted on since the last fetch or the past 24 hours whichever is shorter. Will return an error code if called sooner than 10 minutes after the last fetch. In order to make client development a little less frustrating for the first 50 fetches this restriction is overlooked, and during this time you may also use the parameter 'clear' to reset the last fetch time to 24 hours before. After the 50th fetch the clear option is ineffective, and the minimum time between polls will be strictly enforced. Clients should use the data in the 'info' tag to control their fetch time as the minimum may change without warning. Read the announcement for more detail.
Returns XP and other basic information for a requested user. If the "votesleft" field is not required, for_user=username or for_userid=homenodeID can be used, which avoids requiring a login. Otherwise returns information for the logged-in user (or for Anonymous Monk if no login). If showlevels=1 is given then the response set will include additional elements describing the levels in the Voting/Experience System and if shownorm=1 is given then the response will include the current "norm", showall=1 includes both sets of additional info. Also accepts the xmlstyle=clean attribute.
Returns list of users appearing in the Other Users nodelet. No parameters. Does not require a login.
Returns basic information about the most recent nodes and users. An optional parameter of sinceunixtime=epochseconds or days=decimal returns all nodes created since that date, up to a maximum of 8.0 days (691200 seconds) ago (default is days=1.0). Does not require a login. Respects the xmlstyle parameter, with the additional style of 'rss' which means the return is a valid RSS format and not the usual PM style list. Optional parameter of types=typename,typename,... controls what types of nodes are returned. Default types are:CUFP note poem user quest snippet perlnews perlcraft bookreview obfuscated sourcecode monkdiscuss modulereview perlquestion perltutorial perlmeditation categorized answer categorized questionSee Perlmonks TagCloud for an interesting application.
Users of this feed should be aware of rss feed corrupted by certain nodes.
Returns information about specific node(s). Required parameter is nodes=nodeID[,nodeID,nodeID,...], where each nodeID is a numeric node ID value. Does not require a login. request for another attribute of nodes in XML (node query, newest nodes, etc) provides additional documentation.
Returns the node IDs of a thread, properly nested. Required parameter id=nodeID specifies the node ID of the root of the tree of replies to be returned.
Scratch Pad Viewer now acts as a proxy for displaying users' scratchpads (by name) in XML. Please see Scratchpads Revisited and some XML Node View Changes for details.
You may view nodes in XML by putting displaytype=xml in the request. The default XML is older and has various properties that make it easier to parse with a regex, but conversly harder to handle with normal XML manipulation tools. This has been resolved by adding the xmlstlye=clean and xmlstyle=flat settings. The former is cleaner (i.e. no added newlines inside content bearing XML tages) and the latter uses elements named after the actual DB columns used by PM instead of the 'data' elements the old style provides. New clients and software should almost definitely use the xmlstyle=flat mode.
You may filter fields out with the 'nosend' parameter which may be present multiple times and or contain a comma seperated list of field names to ignore. In addition the 'nofields' parameter may be provided to ignore most 'common' fields (excluding id and type, but including things like 'doctext' etc.) This can be useful when accessing the XML of certain nodes which have "passthrough" behaviour so you don't have to download the non passthrough dataset. An example is node id 109, login, which has special behaviour included to help you tell if you have logged in correctly. All of the following nodes have special xml behaviour over that of the normal XML view: Login, Best Nodes, Worst Nodes, Scratch Pad Viewer, Search internal code, Selected Best Nodes.
PerlMonks automation clients can use this to spider the site in various ways. Its concept of operation is just like that of the Node Navigator nodelet: given a node (by ID), it reports the previous and next node, the previous and next of the same node type (e.g. Meditation), and the previous and next by the same author. Optionally, it lets you request the previous/next node, relative to the given node, of a different type or by a different author.
The arguments are:
Information on the search, including the search parameters and any error conditions, is reported in the <info> "header" element of the result.
- id= node id of the reference node
- nodetype= id of the desired node type (optional)
- author= id of the desired author (that is, their homenode id) (optional)
An RDF feed for the Monastery. Please note that it's only updated once daily, at 11:57 GMT ( = UTC = unixtime).
Returns the current time of the database server; useful for comparing to various timestamps in other data.
There are currently only a few RSS feeds generated on-site:
Please /msg SiteDocClan with any corrections.