@@ -0,0 +1,1231 @@
+# -*- coding: utf-8 -*-%0A%0Afrom tapioca import (%0A    JSONAdapterMixin,%0A    TapiocaAdapter,%0A    generate_wrapper_from_adapter,%0A)%0A%0Afrom requests.auth import HTTPBasicAuth%0A%0Afrom .resource_mapping import RESOURCE_MAPPING%0A%0A%0Aclass TogglClientAdapter(JSONAdapterMixin, TapiocaAdapter):%0A    api_root = 'https://www.toggl.com/api/v8/'%0A    resource_mapping = RESOURCE_MAPPING%0A%0A    def get_request_kwargs(self, api_params, *args, **kwargs):%0A        params = super(TogglClientAdapter, self).get_request_kwargs(%0A            api_params, *args, **kwargs%0A        )%0A%0A        access_token = api_params.get('access_token')%0A%0A        if access_token:%0A            params%5B'auth'%5D = HTTPBasicAuth(%0A                api_params.get('access_token'),%0A                'api_token'%0A            )%0A        else:%0A            params%5B'auth'%5D = HTTPBasicAuth(%0A                api_params.get('user'),%0A                api_params.get('password')%0A            )%0A%0A        return params%0A%0A    def get_iterator_list(self, response_data):%0A        return response_data%0A%0A    def get_iterator_next_request_kwargs(self, iterator_request_kwargs,%0A                                         response_data, response):%0A        pass%0A%0A%0AToggl = generate_wrapper_from_adapter(TogglClientAdapter)%0A

Implement TogglClientAdapter with HTTPBasicAuth