Restructure how the URL is generated for API calls
Restructure how the URL is generated for API calls

For each API segment (subclasses _BaseAPI), use a simple template to
construct the URL used to make the API call.  This is done by specifying
an attribute within a class (_api_uri) that lists each component of the
path as a string or None.  _gen_url() merges this tuple with arguments
passed by the calling method where a None is replaced by an argument in
order.  If there is not an argument to replace a None, then the
remaining components of _api_uri are ignored.  This change should make
it easier to build the correct URL for all API segments in a uniform
manner.

For example, the following:
_api_uri = ('path/', None, 'data/', None)
args = (7, )
looks like this merged:
'path/7/data/'

smartfile/client-python