Skip to content

Instantly share code, notes, and snippets.

@edkf
Last active January 9, 2018 23:33
Show Gist options
  • Save edkf/ec907069eefbad13ea685892a67b8afd to your computer and use it in GitHub Desktop.
Save edkf/ec907069eefbad13ea685892a67b8afd to your computer and use it in GitHub Desktop.
# Getting data from the CoinMarketCap API
coins = JSON.parse Utils.domLoadDataSync 'https://api.coinmarketcap.com/v1/ticker/'
# Loop through all coins
for coin, index in coins
# Extracting values stored in the coin object
{name, id, symbol, price_usd : price} = coin
# Create a Layer for each coin
coinRow = new Layer
parent: list.content
width: Screen.width
height: 100
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment