UriTemplate.VarSpec

Represents a single varspec from a URI template expression.

Summary

fetch(vars, varspec, encode_value? \\ true)

Returns a tuple with :ok followed by URI encoded value of the variable specified. If there is no such variable (or its value is blank :missing is returned

from_string(varspec_str)

Parses varspec_str and returns a `UriTemplate.VarSpec struct representing it

get(vars, varspec, default \\ "", encode_value? \\ true)

Returns the URI encoded value of the variable specified, or the default

Functions

fetch(vars, varspec, encode_value? \\ true)

Returns a tuple with :ok followed by URI encoded value of the variable specified. If there is no such variable (or its value is blank :missing is returned

from_string(varspec_str)

Parses varspec_str and returns a `UriTemplate.VarSpec struct representing it.

get(vars, varspec, default \\ "", encode_value? \\ true)

Returns the URI encoded value of the variable specified, or the default