xmlrpc

Types

A call to an XMLRPC method

pub type MethodCall {
  MethodCall(name: String, arguments: List(Parameter))
}

Constructors

  • MethodCall(name: String, arguments: List(Parameter))
pub type MethodResponse {
  MethodResponse(params: List(Parameter))
}

Constructors

A parameter passed to an XMLRPC method

pub type Parameter {
  StringParameter(val: String)
  ArrayParameter(val: List(Parameter))
  BooleanParameter(val: Bool)
  IntegerParameter(val: Int)
  NilParameter
}

Constructors

  • StringParameter(val: String)
  • ArrayParameter(val: List(Parameter))
  • BooleanParameter(val: Bool)
  • IntegerParameter(val: Int)
  • NilParameter

Values

pub fn accept_value(
  inp: xmlm.Input,
) -> Result(#(Parameter, xmlm.Input), String)
pub fn parse_response(
  resp: response.Response(String),
) -> Result(MethodResponse, String)
pub fn parse_response_input(
  inp: xmlm.Input,
) -> Result(MethodResponse, String)
pub fn to_request(
  call: MethodCall,
  endpoint: uri.Uri,
) -> Result(request.Request(string_tree.StringTree), String)

Convert the given method call to an http request against the given endpoint.

pub fn to_request_body(
  call: MethodCall,
) -> string_tree.StringTree

Convert the given method call to the required XML body.

pub fn to_xml(call: MethodCall) -> xmb.Xml

Convert the given method call to the required XML tree.

pub fn to_xml_param(p: Parameter) -> xmb.Xml

Convert a parameter to a tag, which usually lives under .

✨ Search Document