A Python SDK for GiftBit's API
Project description
giftbit-python
A Python SDK for GiftBit's API.
Installation
$ pip install giftbit
Getting Started
API Credentials
The GiftbitClient
needs your Giftbit credentials. You can pass them into the constructor
or use the environment variable GIFTBIT_API_KEY
.
from giftbit import GiftbitClient
client = GiftbitClient(api_key="<your api key here>")
# or using the environment variable
client = GiftbitClient()
By default, the GiftbitClient
uses Giftbit's testbed API. To use the production API server, do the following:
from giftbit import GiftbitClient,
client = GiftbitClient(testbed=False)
You can check to see if the client is configured correctly by using the ping method
from giftbit import GiftbitClient,
client = GiftbitClient(testbed=False)
result = client.ping()
print(result)
Brands
List Brands
from giftbit import GiftbitClient,
client = GiftbitClient()
result = client.list_brands()
for brand in result['brands']:
print(brand['name'])
Get Individual Brand
from giftbit import GiftbitClient,
client = GiftbitClient()
result = client.get_brand('amazonus')
print(result['brand'])
Regions
Not implemented yet
Campaigns
Not implemented yet
Funds
Not implemented yet
Gifts
Not implemented yet
Links
Not implemented yet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
giftbit-0.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
giftbit-0.1-py3-none-any.whl
(3.9 kB
view hashes)