dzt / supreme-api

:tshirt: :shoe: :computer: Node.js API for supremenewyork.com
MIT License
83 stars 27 forks source link

How do I get the URL of an item? #7

Closed Benisthebest closed 6 years ago

Benisthebest commented 6 years ago

How do I get the URL of an item? I am building a bot for a friend and I want the url of any item.

Logfro commented 6 years ago

Best solution would be to use the seek function and then get the url from the response

Benisthebest commented 6 years ago

How do you? The example doesn't show that.

Logfro commented 6 years ago

const category = 'jackets'; const keywords = "UNDERCOVER"; const style = 'Burgundy';

supreme.seek(category, keywords, style, (product, err) => { if (err) { console.log(err); return err; } console.log(product); console.log(product.title); // example => Supreme®/UNDERCOVER Wool Overcoat });

actually it does, by "console.log(product)" it also outputs the url, then you just need to get the value from the array

Benisthebest commented 6 years ago

Thank you.