Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Using API basics and external api

1410694839

Edited 1410697172
Hi, I am looking to create a game with the roll values being created from the bitcoin blockchain api. The api here: <a href="https://blockchain.info/q" rel="nofollow">https://blockchain.info/q</a> has calls you can make. like difficulty, current hash etc, presumably price can be obtained. So if I can obtain a number from the api, then perhaps use it in a sum then I can create a blockchain dependant game. Is there a really simple example of calling an from an external api and a dice roll? If I can then achieve this, how do I create my dice. (Edit.. Ok, I'm going to have to subscribe to mentor level realistically to achieve this.) Where do I upload a script for a dice roll? Or is it via the macro, I'm trying to work my way through the guides, I haven't seen a practical one for this type of thing. All examples and help would be absolute treasure!
1410696834
Lithl
Pro
Sheet Author
API Scripter
The API cannot make external calls You can only use the API if the campaign owner has a Mentor subscription, which would likely be why you're having difficulty finding where to "upload" it.
1410697252

Edited 1410697700
Hmm. Thanks I've just worked out the 2nd part. As a mentor could I load a database of values from and call from that? So say a previous day in the Blockchain.
1410707096
The Aaron
Roll20 Production Team
API Scripter
"Database" probably isn't the right word, but you can certainly upload an object in JSON format and use it in your script.
Ok, cool. I think the Blockchain can be used with JSON... So I'm going to have to find out about this little detail.