We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As of the date of this posting, I was unable to get this library working. Here's what I did instead:
Here's my working mini-client:
class DripClient(object): token = None account_id = None api_url = 'https://api.getdrip.com/v2' def __init__(self, token, account_id): self.token = token self.account_id = account_id self.headers = { 'Content-Type': 'application/vnd.api+json', 'User-Agent': 'offerletter.io' } def get_campaigns(self): url = '{api_url}/{account_id}/campaigns/'.format(api_url = self.api_url, account_id = self.account_id) response = requests.get(url, headers=self.headers, auth=requests.auth.HTTPBasicAuth(self.token, '')) return response
Key differences from this library:
HTH, Vaibhav
The text was updated successfully, but these errors were encountered:
Alternative approach in init:
import base64 self.headers['Authorization'] = 'Basic %s' % base64.b64encode(self.token)
Sorry, something went wrong.
No branches or pull requests
As of the date of this posting, I was unable to get this library working. Here's what I did instead:
Here's my working mini-client:
Key differences from this library:
HTH,
Vaibhav
The text was updated successfully, but these errors were encountered: