Git Product home page Git Product logo

APICompare

This javascript code fetches two api:s in json format from two different web servers and compares all the values that has the same name. Pirmary made to compare two CSGO skin price lists, as the CSGOFast price list and the Steamapi.io price list.

Results, and input/output

You will enter two url:s that leads to json files of objects with different numeric values. The names should be the same on the two price lists, at least some names. The script will compare the values with the same name, and print the difference in the console. Then, all the items will be sorted and put into a document called differenceList.json, aswell as some statistics about how many items that had the same value.

Installation

You have to have Node.js, and you have to do this:

npm install fs
npm install request

Then you can run the bot using:

node apiCompare.js

Setup

There is not much to setup. The only thing you need to setup is the different API links. Open the apiCompare.js file, and on the top two rows you will find

const api1 = ""
const api2 = ""

Put two urls in those constants, and you will be ready to fire up the script!

Tests

You can use this with any two website-based api:s written in json, that shares the same names and has numberic values. The script is specific used for comparing price lists valuing skins on Steam. Some example price lists are:

https://api.csgofast.com/price/all
https://api.steamapi.io/market/prices/730?key= (followed by your key from steamapi.io)

Jonathan Widén's Projects

carunblocker icon carunblocker

Solves "Unblock Car"-kinds of puzzles, and "Blocked" from Fancade

dandy icon dandy

DFA and NFA language implementation and operations

discord.js icon discord.js

A powerful JavaScript library for interacting with the Discord API

either icon either

The enum Either with variants Left and Right is a general purpose sum type with two cases.

nom icon nom

Rust parser combinator framework

primo icon primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.

swot icon swot

Identify email addresses or domains names that belong to colleges or universities. Help automate the process of approving or rejecting academic discounts.

typst-hs icon typst-hs

Haskell library for parsing and evaluating typst

util icon util

Some simple utilities for java, now with gradle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.