# Path: exactonline/exceptions.py
# class MultipleObjectsReturned(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass
# 
# class ObjectDoesNotExist(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass
# 
# Path: exactonline/http.py
# def binquote(value):
#     """
#     We use quote() instead of urlencode() because the Exact Online API
#     does not like it when we encode slashes -- in the redirect_uri -- as
#     well (which the latter does).
#     """
#     return quote(value.encode('utf-8'))
# 
# Path: exactonline/resource.py
# class DELETE(_Resource):
#     pass
# 
# class GET(_Resource):
#     pass
# 
# class POST(_Resource):
#     pass
# 
# class PUT(_Resource):
#     pass


from ..exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from ..http import binquote
from ..resource import DELETE, GET, POST, PUT
        for key, value in kwargs.items():
            args.append('$%s=%s' % (
                key, binquote(to_unistr(value))))
        if args:
            args = ('?' + '&'.join(args))
        else:
            args = ''

        ret = self._api.restv1(GET(self.resource + args))
        return ret

    # == POST / create ==

    def create(self, element_dict):
        ret = self._api.restv1(POST(str(self.resource), element_dict))
        return ret

    # == DELETE / remove ==

    def delete(self, remote_guid):
        remote_id = self._remote_guid(remote_guid)
        uri = '%s(%s)' % (self.resource, remote_id)
        ret = self._api.restv1(DELETE(str(uri)))
        return ret

    # == PUT / update ==

    def update(self, remote_guid, element_dict):
        remote_id = self._remote_guid(remote_guid)
        uri = '%s(%s)' % (self.resource, remote_id)

# Path: exactonline/exceptions.py
# class MultipleObjectsReturned(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass
# 
# class ObjectDoesNotExist(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass
# 
# Path: exactonline/http.py
# def binquote(value):
#     """
#     We use quote() instead of urlencode() because the Exact Online API
#     does not like it when we encode slashes -- in the redirect_uri -- as
#     well (which the latter does).
#     """
#     return quote(value.encode('utf-8'))
# 
# Path: exactonline/resource.py
# class DELETE(_Resource):
#     pass
# 
# class GET(_Resource):
#     pass
# 
# class POST(_Resource):
#     pass
# 
# class PUT(_Resource):
#     pass


# Path: exactonline/api/manager.py
from ..exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from ..http import binquote
from ..resource import DELETE, GET, POST, PUT

        for key, value in kwargs.items():
            args.append('$%s=%s' % (
                key, binquote(to_unistr(value))))
        if args:
            args = ('?' + '&'.join(args))
        else:
            args = ''

        ret = self._api.restv1(GET(self.resource + args))
        return ret

    # == POST / create ==

    def create(self, element_dict):
        ret = self._api.restv1(POST(str(self.resource), element_dict))
        return ret

    # == DELETE / remove ==

    def delete(self, remote_guid):
        remote_id = self._remote_guid(remote_guid)
        uri = '%s(%s)' % (self.resource, remote_id)
        ret = self._api.restv1(DELETE(str(uri)))
        return ret

    # == PUT / update ==

    def update(self, remote_guid, element_dict):
        remote_id = self._remote_guid(remote_guid)
        uri = '%s(%s)' % (self.resource, remote_id)

        ret = self._api.restv1(PUT(str(uri), element_dict))