This library is intended to make API calls to the Branch.io API.
- v0.1.0:
- Initial Revision
%> pip install branchio
To create a client, do the following
import branchio
client = branchio.Client("BRANCH KEY")
response = client.create_deep_link_url(
data={
branchio.DATA_BRANCH_IOS_URL="<customer iOS download link>",
"user": {
"name": "John Doe"
}
},
channel="facebook"
)
url = response[branchio.RETURN_URL]
params1 = client.create_deep_link_url(
data={
"user": {
"name": "John Doe"
}
},
channel="facebook",
skip_api_call=True
)
params2 = client.create_deep_link_url(
data={
"user": {
"name": "Jane Doe"
}
},
channel="facebook",
skip_api_call=True
)
response = client.create_deep_linking_urls([params1, params2])
To test locally, simply cd into the project directory and run
%> coverage run --source branchio/ -m unittest discover
If you do not define the environment variable "BRANCH_IO_KEY" the test will run using stubbed responses.
I haven't setup the other calls yet but will get to that at some point. If you would like to contribute, simply fork the repository and submit a pull request.