# Path: OSMPythonTools/api.py
# class Api(CacheObject):
#     def __init__(self, endpoint='http://www.openstreetmap.org/api/0.6/', **kwargs):
#         super().__init__('api', endpoint, jsonResult=False, **kwargs)
#     
#     def _queryString(self, query, params={}, history=False):
#         query = query + ('/history' if history else '')
#         return (query, query, params)
#     
#     def _queryRequest(self, endpoint, queryString, params={}):
#         return endpoint + queryString
#     
#     def _rawToResult(self, data, queryString, params, kwargs, cacheMetadata=None, shallow=False):
#         return ApiResult(data, queryString, params, cacheMetadata=cacheMetadata, shallow=shallow, history=kwargs['history'] if 'history' in kwargs else False)


from OSMPythonTools.api import Api

def metadata(x):
  assert x.version() != None and x.version() != '' and float(x.version()) > 0
  assert x.generator() != None and x.generator() != ''
  assert x.copyright() != None and x.copyright() != ''
  assert x.attribution() != None and x.attribution() != ''
  assert x.license() != None and x.license() != ''

def test_node():

# Path: OSMPythonTools/api.py
# class Api(CacheObject):
#     def __init__(self, endpoint='http://www.openstreetmap.org/api/0.6/', **kwargs):
#         super().__init__('api', endpoint, jsonResult=False, **kwargs)
#     
#     def _queryString(self, query, params={}, history=False):
#         query = query + ('/history' if history else '')
#         return (query, query, params)
#     
#     def _queryRequest(self, endpoint, queryString, params={}):
#         return endpoint + queryString
#     
#     def _rawToResult(self, data, queryString, params, kwargs, cacheMetadata=None, shallow=False):
#         return ApiResult(data, queryString, params, cacheMetadata=cacheMetadata, shallow=shallow, history=kwargs['history'] if 'history' in kwargs else False)


# Path: tests/test_api.py
from OSMPythonTools.api import Api


def metadata(x):
  assert x.version() != None and x.version() != '' and float(x.version()) > 0
  assert x.generator() != None and x.generator() != ''
  assert x.copyright() != None and x.copyright() != ''
  assert x.attribution() != None and x.attribution() != ''
  assert x.license() != None and x.license() != ''

def test_node():

  api = Api()