Skip to content

This is a very small example application that authenticates against the iRacing API and fetch the tracks.

License

matthias-hampel/deno-iracing-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno-iracing-api-client 🦕

This project is a very small Deno application that authenticates against the iRacing API and fetch the tracks.

There are only three functions: hashPassword, login and fetchData.

The login function uses a CookieJar to store the returned cookies, including the authtoken set during login.

This CookieJar is then passed to the fetchData function that handles the data request.

Make sure to enable Legacy Read Only Authentication

Important: This is only an example. If you're doing many requests against the iRacing API you should store the authentication data avoiding to re-authenticate with each request.

# install dependencies
$ deno install

# run (make sure you've enabled legacy read only authentication!)

# to avoid, that the command with your password is stored in the bash history, make sure that you add a leading space
$  deno run main.ts [email protected] MyPassWord


# run tests
$ deno test

About

This is a very small example application that authenticates against the iRacing API and fetch the tracks.

Topics

Resources

License

Stars

Watchers

Forks