]> gitweb.factorcode.org Git - factor.git/blob - basis/xml-rpc/xml-rpc-docs.factor
functors: inline the parts of interpolate this needs
[factor.git] / basis / xml-rpc / xml-rpc-docs.factor
1 USING: help.syntax help.markup math sequences strings ;
2 IN: xml-rpc
3
4 HELP: send-rpc
5 { $values { "rpc" "an RPC data type" } { "xml" "an XML document" } }
6 { $description "converts an RPC data type into an XML document which can be sent to another computer" }
7 { $see-also receive-rpc } ;
8
9 HELP: receive-rpc
10 { $values { "xml" "an XML document" } { "rpc" "an RPC data type" } }
11 { $description "parses an XML document into an RPC data type, for further local processing" }
12 { $see-also send-rpc } ;
13
14 HELP: <base64>
15 { $values { "string" string } { "base64" "a base64 tuple" } }
16 { $description "creates a base64 tuple using the data in the string. This marks the data for encoding in the base64 format" }
17 { $see-also base64 } ;
18
19 HELP: base64
20 { $class-description "a piece of data marked for encoding as base64 in an XML-RPC message" }
21 { $see-also <base64> } ;
22
23 HELP: <rpc-method>
24 { $values { "name" string } { "params" sequence } { "rpc-method" rpc-method } }
25 { $description "creates a tuple representing a method call which can be translated using send-rpc into an XML-RPC document" }
26 { $see-also rpc-method <rpc-response> <rpc-fault> } ;
27
28 HELP: rpc-method
29 { $class-description "a tuple which is equivalent to an XML-RPC method send. Contains two fields, name and params" }
30 { $see-also <rpc-method> rpc-response rpc-fault } ;
31
32 HELP: <rpc-response>
33 { $values { "params" sequence } { "rpc-response" rpc-response } }
34 { $description "creates a tuple representing a data response in XML-RPC" }
35 { $see-also rpc-response <rpc-method> <rpc-fault> } ;
36
37 HELP: rpc-response
38 { $class-description "represents an XML-RPC method response, with a number of parameters holding data. Contains one field, params, a sequence" }
39 { $see-also <rpc-response> rpc-method rpc-fault } ;
40
41 HELP: <rpc-fault>
42 { $values { "code" integer } { "string" string } { "rpc-fault" rpc-fault } }
43 { $description "creates a tuple representing an exception in RPC, to be returned to the caller. The code is a number representing what type of error it is, and the string is a description" }
44 { $see-also rpc-fault <rpc-method> <rpc-response> } ;
45
46 HELP: rpc-fault
47 { $class-description "represents an XML-RPC fault" }
48 { $see-also <rpc-fault> rpc-method rpc-response } ;
49
50 HELP: post-rpc
51 { $values { "rpc" "an XML-RPC input tuple" } { "url" "a URL" }
52     { "rpc'" "an XML-RPC output tuple" } }
53 { $description "posts an XML-RPC document to the specified URL, receives the response and parses it as XML-RPC, returning the tuple" } ;
54
55 ARTICLE: { "xml-rpc" "intro" } "XML-RPC"
56 "This is the XML-RPC library. XML-RPC is used instead of SOAP because it is far simpler and easier to use for most tasks. The library was implemented by Daniel Ehrenberg."
57 $nl
58 "The most important words that this library implements are:"
59 { $subsections
60     send-rpc
61     receive-rpc
62 }
63 "data types in XML-RPC"
64 { $subsections
65     base64
66     rpc-method
67     rpc-response
68     rpc-fault
69 }
70 "the constructors for these are"
71 { $subsections
72     <base64>
73     <rpc-method>
74     <rpc-response>
75     <rpc-fault>
76 }
77 "other words include"
78 { $subsections post-rpc } ;