Wrapper package for supremenewyork.com written in Go
Just wanted to get more familiar with writing go code and since I had some prior experience with Supreme's backend I could focus mainly on writing go.
This project is currently not ready for release but if you'd like to mess around with it here's how...
Example usage:
// Create a new instance of gosupreme and initialize it.
s := gosupreme.New()
s.Init()
// Get all products that have the keyword 'Boxer Briefs (2 Pack)' in their
// name.
products, _ := s.GetProductsByKeyword("Boxer Briefs (2 Pack)")
// Select the first one from the list of returned products
var product = (*products)[0]
// Fetch that products data (styles, sizes, etc...)
s.FetchProductData(product)
// Get all of the product's styles (these are the different colors/variants
// the products come in)
styles, _ := s.GetAllStyles(product)
// Get a style that is the color 'purple'
style, _ := styles.GetStyleByColor("purple")
// Get the size that is 'medium'
size, _ := style.GetSize("medium")
// Print the product, style, and size to console.
fmt.Println(product)
fmt.Println(style)
fmt.Println(size)
Output of the code above:
[gosupreme] 2021/06/20 12:31:04.812178 Fetching latest stock from supreme.
[gosupreme] 2021/06/20 12:31:05.178247 Fetched stock with release date '06/17/2021'.
[gosupreme] 2021/06/20 12:31:05.178287 Fetching product data for 173930 (Supreme®/Hanes® Boxer Briefs (2 Pack))
Product: Name: Supreme®/Hanes® Boxer Briefs (2 Pack)
ID: 173930
Category: Accessories
Price:28
Style:
ID: 29598
Color: Purple
Size:
Name: Medium
ID: 85957
This project is currently at a very early stage and a work in progress. More features will be added soon.
- Fetch latest stock from Supreme
- Get products by category
- Get products by keyword
- Get all product styles
Planned:
- ⚪ Keep track of changes in stock
- ⚪ Fetch stock at an interval
In-progress:
- 🟡 Make the API easier to use
- 🟡 Monitor stock by product keyword