@@ -0,0 +1,1638 @@
+from evrythng import assertions, utils%0A%0A%0Adatatype_specs = %7B%0A    'position': 'geojson',%0A    'timestamp': 'time',%0A%7D%0Arequired_fields = ('position',)%0Areadonly_fields = tuple()%0Awritable_fields = ('timestamp',)%0A%0A%0Adef _validate_data(kwargs):%0A    %22%22%22Sanity checking of data that is submitted to evrythng.%22%22%22%0A    assertions.required(kwargs, required_fields)%0A    assertions.readonly(kwargs, readonly_fields)%0A    assertions.no_extras(%0A        kwargs, required_fields + writable_fields + readonly_fields)%0A    assertions.datatypes(kwargs, datatype_specs)%0A%0A%0Adef update_location(thng_id, position=None, timestamp=None, api_key=None):%0A    data = %7B'position': position, 'timestamp': timestamp%7D%0A    _validate_data(data)%0A    url = '/thngs/%7B%7D/location'.format(thng_id)%0A    return utils.request('PUT', url, data=data, api_key=api_key)%0A%0A%0A# def create_thng(name, description=None, brand=None, categories=None,%0A#                    photos=None, url=None, identifiers=None, properties=None,%0A#                    tags=None, customFields=None, api_key=None):%0A#     kwargs = locals()%0A#     api_key = kwargs.pop('api_key', None)%0A#     _validate_data(kwargs)%0A#     return utils.request('POST', '/thngs', data=kwargs, api_key=api_key)%0A%0A%0Adef list_locations(thng_id, api_key=None):%0A    url = '/thngs/%7B%7D/location'.format(thng_id)%0A    return utils.request('GET', url, api_key=api_key)%0A%0A%0A# def read_thng(thng_id, api_key=None):%0A#     url = '/thngs/%7B%7D'.format(thng_id)%0A#     return utils.request('GET', url, api_key=api_key)%0A%0A%0Adef delete_location(thng_id, api_key=None):%0A    url = '/thngs/%7B%7D/location'.format(thng_id)%0A    return utils.request('DELETE', url, api_key=api_key)%0A

add api for locations