Skip to content
New issue

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

Fix Bitcoin Tracker example's Coindesk API URL #1106

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

newfurniturey
Copy link

Coindesk updated their API and now has a "Min API" and "Data API". The Min API has the most minimum amount of data returned, and since this specific example just looks for the "price of 1 BTC in USD", it seems most reasonable to use.

This PR updates the API URL and expected response JSON payload in the example star file and the tutorial doc.

This PR also updates the example star file to read the image from a Base64 string. PR#1045 changed this functionality originally, stating Starlark now supports this; however, it doesn't appear to be actual Starlark functionality (but rather a custom Pixlet addition) and attempting to use load("icon.png", icon = "file") as-is yields the following error:

error loading applet: starlark.ExecFile: cannot load icon.png: invalid module: icon.png

I have not updated any of the other references throughout the codebase, only the bitcoin tracker example, to "test the waters". I'm okay to take that piece out of this PR if desired -- but including it allows it to actually render 😅

This should address Issue #663 and Issue #990.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant