CitySDK iOS Library
 All Classes Functions Variables Enumerations Enumerator Properties
Instance Methods | Class Methods | Properties | List of all members
UriTemplate Class Reference
Inheritance diagram for UriTemplate:

Instance Methods

(void) - set:withValue:
 Set the values of each template. More...
 
(BOOL) - hasParameter:
 Checks whether the URI contains the given name in the templated area. This method is case sensitive. More...
 
(NSString *) - build
 Builds the desired URI. This method resets previously set values. More...
 

Class Methods

(UriTemplate *) + fromTemplate:
 Generate a UriTemplate with a given template form. More...
 

Properties

NSString * template
 
NSMutableDictionary * values
 

Detailed Description

A simplified implementation of the URI Template (RFC6570) used to build the server URIs.

Author
Pedro Cruz

Method Documentation

- (NSString *) build

Builds the desired URI. This method resets previously set values.

Returns
a String containing the expanded URI Template into a URI
+ (UriTemplate *) fromTemplate: (NSString *)  template

Generate a UriTemplate with a given template form.

Parameters
templatethe wanted template
Returns
UriTemplate
- (BOOL) hasParameter: (NSString *)  parameter

Checks whether the URI contains the given name in the templated area. This method is case sensitive.

Parameters
parameterthe parameter to find
Returns
true if the templated area contains the name, false otherwise
- (void) set: (NSString *)  name
withValue: (id)  value 

Set the values of each template.

Parameters
namethe name of the template
valuethe value of the template. Supported objects: simple objects, Arrays and Dictionaries.

The documentation for this class was generated from the following files: