tiltshift / figmint

sync Figma styles to JS
MIT License
97 stars 7 forks source link

grab exports all at once to avoid rate limiting #14

Closed souporserious closed 4 years ago

souporserious commented 4 years ago

Figma's API only allows 25 requests/minute so if you have more icons than that you can get rate limited pretty quickly 😅. I think we just need to refactor the addImageUrlToExport function to pass all of the ids, I did something similar in Unicon. I'll try to get to a PR today.

chrisdrackett commented 4 years ago

Yeah, I ran into this as well, but thought about moving to Diez around the same time and never got to fixing it. That being said, I think I've decided to move back to using figmint so I'm going to be a lot more active here. @souporserious were you able to look at this yet?

souporserious commented 4 years ago

Yup! I ended up making another library that just handles the exports since that's all I needed, but I'll try and take a look at adding it here when I get a chance. This is the shape I have it return right now:

image

chrisdrackett commented 4 years ago

ok, I'll give it a go!

chrisdrackett commented 4 years ago

@souporserious FYI this should be fixed. Would love if you took a look but understand if you have your own solution now!

souporserious commented 4 years ago

Awesome! Looks great from what I can tell 🎉I'll check it out when I get a chance. Thanks for getting that fixed so quickly 🙏