figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Add header for JSONBin to enable bin versioning

Open davidbroza opened this issue 3 years ago • 2 comments

By default, private bins in JSONBin have versioning turned off. This is not ideal for keeping backups of previous files published. This MR enables JSONBin versioning.

To enable versioning, extra header needs to be added as described in: https://jsonbin.io/api-reference/bins/update

Todo:

  • [ ] Versioning in JSONBin is available only for paid users, how can we address this within Figma Tokens plugin? (add toggle? / Check if user is free or paid via rest call ? )

davidbroza avatar Aug 26 '22 12:08 davidbroza

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
figma-tokens ✅ Ready (Inspect) Visit Preview Aug 26, 2022 at 0:25AM (UTC)
ft-storybook ✅ Ready (Inspect) Visit Preview Aug 26, 2022 at 0:25AM (UTC)

vercel[bot] avatar Aug 26 '22 12:08 vercel[bot]

  • [ ] Versioning in JSONBin is available only for paid users, how can we address this within Figma Tokens plugin? (add toggle? / Check if user is free or paid via rest call ? )

Can this just be added and it still works for free users without erroring? We could just let users add this header manually in a custom Headers field maybe? We're aiming to consolidate the URL provider with the JSONBin provider to combine them, for URL we currently have a Headers field.

six7 avatar Sep 08 '22 20:09 six7

Adding the header x-bin-versioning to a request to a FREE account will trigger an error.

{"message":"Versioning is not available for the Free users. Upgrade to Pro plan http://api.jsonbin.io/pricing to avail this feature"}

I think allowing a header field would be a good option if we're consolidating JSONBin with URL.

stramel avatar Sep 27 '22 19:09 stramel

Adding the header x-bin-versioning to a request to a FREE account will trigger an error.


{"message":"Versioning is not available for the Free users. Upgrade to Pro plan http://api.jsonbin.io/pricing to avail this feature"}

I think allowing a header field would be a good option if we're consolidating JSONBin with URL.

If we consolidate url and jsonbin to a generic url storage that allows both push/pull as outlined in https://github.com/six7/figma-tokens/pull/1140 this would solve this as we'd have a header there 👍

six7 avatar Sep 27 '22 20:09 six7