Last active
August 29, 2015 13:56
-
-
Save PanosJee/8821377 to your computer and use it in GitHub Desktop.
Upload Proguard Mappings files to BugSense via API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
bugsense_cli.py | |
~~~~ | |
Sample script to upload dSYMSs and access the Read API | |
:version: 0.1 | |
:copyright: 2013 by bugsense.com. | |
""" | |
from urllib import quote | |
import zipfile | |
import json | |
import os | |
def upload_mappings(api_key, token, filename, app_version): | |
""" | |
api_key: The api key of the Android app | |
token: The API token you will find under your account | |
filename: The path to the mappings file (including file name) | |
app_version: The app version to which the mappings file correspond | |
""" | |
url = "https://symbolicator.splkmobile.com/upload/mapping" | |
headers = { | |
'X-Bugsense-auth-token': token, | |
'X-Bugsense-api-key': api_key, | |
'X-Bugsense-appver': app_version | |
} | |
files = { 'file': open(filename, 'rb') } | |
requests.post(url, | |
files=files, | |
headers=headers, | |
verify=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment