Racers API

Documentation on how to play the game with other languages coming soon! (If anyone wants to help, I think you can make pull requests on Github. You can help with making requests to the server in other languages like JavaScript or any other language since I won't be able to as I don't know all those languages. Link: Racers-API/README.md at main · billyBob456/Racers-API · GitHub).

LOL. Alright. Just in case, I know how to make them.

The url used in the start block returns nothing.

Fixed. It was because the URL had no "/" at the end. Such a small error.

I've added most of the documentation on how to play the game with Python. If anyone knows how to translate Python to JavaScript please tell me so I can add JavaScript documentation too. And not only JavaScript! Any language works! Thank you very much. Also if anyone wants to proof-read the documentation or just read it to try it yourself, it's available here: Racers-API/README.md at main · billyBob456/Racers-API · GitHub!

I've finished docs for Python and will need help with JavaScript!

I might be able to help. Just know that I'm much less fluent in JS than in Python.

I can help, but I don't have GitHub.

I'm trying to make an example program in node.js, but when I do I GET request to https://racersapi.billybob456.repl.co/start/test
it returns

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="http://racersapi.billybob456.repl.co/start/test/">http://racersapi.billybob456.repl.co/start/test/</a>. If not click the link.

I don't know why that would happen. I don't know node.js and I certainly don't have a page like that.
EDIT: Nevermind. Try doing it with a "/" at the end of the URL

Are you still working on it?

Yes.

OK. Thanks! Just put it in here when you're done.

Darn it. The JSON parser is having a fit for some reason.

The "race" block gives an error, I'm running it by itself without any other context, the way I assume it's supposed to be used. Is this an error with my scripting of the block or a broken piece of code. Is it my user error or a server error?

So what is this? a API that you can use in a game? Does it save?

You are supposed to press the blocks in order from top to bottom. That way you have a key, and then you can see what races are available and select a race. After you can press the race block.

Essentially, yes. It's an app where you use your coding skills to interact with an API while progressing through a game. As for the save part, you can save your progress. You have to copy the second item of the Auth variable down into your clipboard or something like that. Then when you're ready to play again, use the Login block to continue.

What's the error?

undefined:1
{'username': 'kitten', 'car': {'name': 'Honda Civic', 'top speed': 145, 'price': 145000, 'key': '*******************************************************************************************************wfQ=='}, 'coins': 100000}
 ^

SyntaxError: Unexpected token ' in JSON at position 1
    at JSON.parse (<anonymous>)
    at IncomingMessage.resp.on (/home/james/c.js:12:30)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)