wadlMethods: Get descriptions of the methods from a WADL

View source: R/wadl.R

wadlMethodsR Documentation

Get descriptions of the methods from a WADL

Description

This function extracts information from the WADL to describe each of the resources/methods.

Usage

wadlMethods(doc, baseURL = xpathSApply(doc@ref, "//x:resources[@base]", xmlGetAttr, "base", namespaces = "x"))

Arguments

doc

the WADL as a URL/file name, parsed XML document or WADL-class object.

baseURL

the base URL for the resources in this WADL. This comes from the resources node

Value

A list with as many elements as there are methods in the WADL.

Each element is a data frame with as many rows as there are parameters in the method and containing the following columns

name

the name of the parameters

type

the type of the parameters as a character vector

required

a logical vector indicating whether each parameter is required or optional

default

a character vector providing the default value for each parameter, if available

repeating

a logical vector indicating whether a parameter is allowed to have multiple values or is a scalar.

options

a list containing a character vector for each parameter. The character vectors provide, if available, the set of permissible values for that parameter.

Author(s)

Duncan Temple Lang

See Also

wadl

Examples


  gw = wadl(system.file("sampleWADLs", "GenesByMolecularWeight.wadl",  package = "WADL"))

  p = wadlMethods(gw)
  names(p)

  p[[1]]

duncantl/WADL documentation built on Nov. 23, 2023, 4:28 p.m.