sneaks-api

repository·master·Indexed 19 days ago

https://github.com/druv5319/sneaks-api

A Node.js-based RESTful API aggregator that collects sneaker data from resell platforms including StockX, FlightClub, Goat, and Stadium Goods. It provides functionality to search for products via getProducts(), retrieve detailed pricing and product information using getProductPrices(), and fetch popular products through getMostPopular().

Tokens
753
Snippets
5
Records
5
Agent score
17%

What's inside sneaks-api

  1. Get detailed sneaker info and prices with getProductPrices()

    master

    Use getProductPrices(styleID, callback) to retrieve comprehensive information for a specific sneaker. It requires a styleID (string) and returns a detailed product object via a callback.

    The returned object includes:

    • Sneaker Name
    • Colorway
    • Description
    • Release Date
    • Retail Price
    • Style ID
    • Image Links
    • Product links from various resell sites (StockX, Stadium Goods, Goat, Flight Club)
    • A price map (mapping shoe sizes to prices) from each resell site
    const SneaksAPI = require('sneaks-api');
    const sneaks = new SneaksAPI();
    
    // getProductPrices(styleID, callback) returns sneaker info including a price map and more images
    sneaks.getProductPrices("FY2903", function(err, product){
        console.log(product)
    })
  2. Retrieve popular products with getMostPopular()

    master

    Use getMostPopular(limit, callback) to get an array of currently popular products curated by StockX. It takes a limit (number) and returns the products via a callback function.

    const SneaksAPI = require('sneaks-api');
    const sneaks = new SneaksAPI();
    
    // getMostPopular(limit, callback) returns an array of popular products
    sneaks.getMostPopular(10, function(err, products){
        console.log(products)
    })
  3. Search for sneakers with getProducts()

    master

    Use getProducts(keyword, limit, callback) to search for sneakers. It takes a search keyword (string) and a limit (number) and returns an array of product objects via a callback function. Each product object contains a styleID which can be used for more detailed price lookups.

    const SneaksAPI = require('sneaks-api');
    const sneaks = new SneaksAPI();
    
    // getProducts(keyword, limit, callback) returns a product array 
    sneaks.getProducts("Yeezy Cinder", 10, function(err, products){
        console.log(products)
    })
  4. Use SneaksAPI to interface with sneaker data

    master

    The SneaksAPI class is the primary entrypoint for interacting with sneaker data from various resell sites. It is exported from the main module and serves as the controller for sneaker-related operations.

    const SneaksAPI = require('./controllers/sneaks.controllers.js');