Created
June 1, 2014 17:09
-
-
Save riklaunim/1d1cb9bed76ec99a066f to your computer and use it in GitHub Desktop.
This file contains 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
import unirest | |
TEST_KEY = "...." | |
headers = { | |
"X-Mashape-Authorization": "..." | |
} | |
params = { | |
"un": "...", | |
"api_key": TEST_KEY, | |
"origin": "plot", | |
"platform": "python", | |
"version": "0.2", | |
"args": [{"x": [0, 1, 2], "y": [3, 1, 6], "name": "Experimental", "marker": {"symbol": "square", "color": "purple"}}, {"x": [1, 2, 3], "y": [3, 4, 5], "name": "Control"}], | |
"kwargs": {"filename": "plot from api", "fileopt": "overwrite", "style": { "type": "bar" }, "traces": [0,3,5], "layout": { "title": "experimental data" }}, | |
} | |
response = unirest.post( | |
"https://plotly-plotly.p.mashape.com/", | |
headers=headers, | |
params=params, | |
) | |
print response.body, response.code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment