Commits

Donald Stufft committed 6054be9

tear out the authentication meta option and just add auth passed directly to a requests session

  • Participants
  • Parent commits 7497971

Comments (0)

Files changed (1)

slumber/__init__.py

         return Resource(
             base_url=url_join(self._meta.base_url, item),
             format=self._meta.format,
-            authentication=self._meta.authentication,
             append_slash=self._meta.append_slash,
             session=self._session,
         )
     """
 
     class Meta:
-        authentication = None
         base_url = None
         format = "json"
         append_slash = True
 class API(ResourceAttributesMixin, MetaMixin, object):
 
     class Meta:
-        authentication = None
         base_url = None
         format = "json"
         append_slash = True
 
-    def __init__(self, base_url=None, **kwargs):
+    def __init__(self, base_url=None, auth=None, **kwargs):
         if base_url is not None:
             kwargs.update({"base_url": base_url})
 
-        self._session = requests.session()
+        self._session = requests.session(auth=auth)
 
         super(API, self).__init__(**kwargs)