Module Uritemplate.Template
type variable_expressionA variable in an expression, optionally containing a prefix or composite modifier
type expressionA URI template expression. This can be expanded into a real string when the URI is templated
type template_part=|Literal of stringA standard string that will not be expanded
|Expression of expressionAn expandable expression
val empty : tThe empty template
val add_part : template_part -> t -> tadd_part part templateappendspartto the end oftemplate
val add_literal : string -> t -> tadd_literal lit templateappends literallitto the end oftemplate
val add_expression : Expansion_type.t -> variable_expression list -> t -> tadd_expression ex_typ v_exps templateappends an expression with expansion typeex_typand the expressionsv_expsto the end oftemplate
val add_single_expression : Expansion_type.t -> variable_expression -> t -> tadd_single_expression ex_typ v_exp templateappends an expression with expansion typeex_typand the single expressionv_expto the end oftemplate
val create : template_part list -> tcreate partscreates a template withpartsin order
val create_expression : Expansion_type.t -> variable_expression list -> expressioncreate_expression ex_typ v_expscreates an expression with expansion typeex_typand the expressionsv_exps
val create_single_expression : Expansion_type.t -> variable_expression -> expressioncreate_single_expression ex_typ v_expscreates an expression with expansion typeex_typand the single expressionv_exp
val create_variable_expression : ?value_modifier:value_modifier -> string -> variable_expressioncreate_variable_expression namecreates a variable expression with the givenname- parameter value_modifier
creates variable expression with a value modifier
val parts_of_t : t -> template_part listReturns a list of the parts of the given template
val get_expansion_type : expression -> Expansion_type.tReturns the expansion type of the given expression
val get_variable_expressions : expression -> variable_expression listReturns the variable expressions associated with the given expression
val get_variable_expression_name : variable_expression -> stringReturns the name of the given variable_expression
val get_variable_expression_modifier : variable_expression -> value_modifierReturns the value_modifier of the given variable_expression
val part_is_literal : template_part -> boolReturns true if the tempalte_part is a literal
val part_is_expression : template_part -> boolReturns true if the tempalte_part is an expression
val get_variable_names : t -> string listReturns a list of the names of the variables in the expression
val string_of_value_modifier : value_modifier -> stringReturns the string representing the value_modifier, see the
value_modifierfor examples
val string_of_variable_expression : variable_expression -> stringReturns the string representation of the variable_expression. This is the name of the variable expression concatinated with the result of
string_of_value_modifierExample results: "var" "var:5" "var*"
val string_of_template : t -> stringReturns the uri template string of the given template