I've been developing a few private applications using Python and Javascript. I've partially created two libraries to make getting the data from torn easier. I was just wondering if there are any libraries already created that someone could share? If not, I don't mind working on developing several of them for different languages.
[UPDATE - 14/11/2020]
I've created an npm library that isn't complete yet. It has almost covered all the API endpoints apart from the market and torn. Timestamp features are not included yet and multiple chaining of selections. These will be added in upcoming updates along with easier more usable endpoints.
[UPDATE - 20/11/2020]
I have covered all endpoints including the item market. You simply have to provide an item ID to get a list of listing from both the bazaar and item market. I'll give an example below. The next update will be creating tests, documentation, and cleaning up the code. Might even add functionality for timestamps.
Latest Version 0.0.8
NPM URL - https://www.npmjs.com/package/torn-api
Installing
npm install torn-api
yarn add install torn-api
Usage
1. Import the package
2. Set api key
3. In an async function call the api
React Example (It was too difficult to add the code here so it's on gist)
https://gist.github.com/nikkel/cd0b8ee3cf24db0c5422a2db968be9f2
[UPDATE - 14/11/2020]
I've created an npm library that isn't complete yet. It has almost covered all the API endpoints apart from the market and torn. Timestamp features are not included yet and multiple chaining of selections. These will be added in upcoming updates along with easier more usable endpoints.
[UPDATE - 20/11/2020]
I have covered all endpoints including the item market. You simply have to provide an item ID to get a list of listing from both the bazaar and item market. I'll give an example below. The next update will be creating tests, documentation, and cleaning up the code. Might even add functionality for timestamps.
Latest Version 0.0.8
NPM URL - https://www.npmjs.com/package/torn-api
Installing
npm install torn-api
yarn add install torn-api
Usage
1. Import the package
import api from 'torn-api'; 2. Set api key
api.key([TORN_API_KEY]); 3. In an async function call the api
async () => {
console.log(await api.user.basic());
console.log(await api.faction.stats());
}React Example (It was too difficult to add the code here so it's on gist)
https://gist.github.com/nikkel/cd0b8ee3cf24db0c5422a2db968be9f2