Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide JSON/API #460

Closed
markhalliwell opened this issue Nov 20, 2014 · 10 comments
Closed

Provide JSON/API #460

markhalliwell opened this issue Nov 20, 2014 · 10 comments

Comments

@markhalliwell
Copy link

Would BootstrapCDN be willing to provide a list of available versions/styles that BootstrapCDN supports in a JSON file? It could be done very similarly to how https://github.com/thomaspark/bootswatch/blob/gh-pages/api/3.json does it. I suspect that it's generation can easily be automated.

https://www.drupal.org/project/bootstrap is using BootstrapCDN as an out-of-the-box "feature" and I'd like to be able to provide a list of supported versions, without having to manually inject them between versions Drupal versions (just parse a JSON file).

I almost posted an issue with Bootswatch, but they only provide the latest version. It's BootstrapCDN that has the multiple versions. Which, coincidentally, has been causing some confusion and inconsistency when a user chooses a bootswatch theme for a version that doesn't exist... like in the case of Paper, which only exists in version 3.2.0 and higher.

@markhalliwell
Copy link
Author

Just found https://github.com/MaxCDN/bootstrap-cdn/blob/develop/public/data/bootstrapcdn.json but it appears to be out of date and definitely doesn't contain any bootswatch themes.

@markhalliwell
Copy link
Author

Also, that file differs from what https://maxcdn.bootstrapcdn.com/data/bootstrapcdn.json outputs

@jimaek
Copy link
Member

jimaek commented Nov 21, 2014

There is http://api.jsdelivr.com/v1/bootstrap/libraries if you like it.
Here is the documentation https://github.com/jsdelivr/api

@markhalliwell
Copy link
Author

Awesome, that certainly helps bring it in the right direction. However, I would still have to manually parse it to determine which bootswatch themes are available for which version. Sure I can do that, but it would be nice if there was something that could be consumed without having to be parsed.

@jimaek
Copy link
Member

jimaek commented Nov 21, 2014

I will try to address this in the next jsDelivr API version but it will take a while. Unless @jdorfman wants to build a custom json I dont see any other solution that can be consumed today.

@markhalliwell
Copy link
Author

Sure, I understand. I can certainly work with what jsDelivr is outputting for now and just glad to see you're still open to further enhancements instead of just closing this issue :) I will wait patiently.

@tomByrer
Copy link

However, I would still have to manually parse it to determine which bootswatch themes are available for which version

So you want an output that is pivoted? Can you provide an output example please?

@jmervine
Copy link
Contributor

jmervine commented Dec 1, 2014

I've updated "http://www.bootstrapcdn.com/data/bootstrapcdn.json" to match the latest truth. Additionally, I've pushed the update to the CDN origin hosts and requested a purge. I'll update this ticket once the purge is complete.

@jmervine
Copy link
Contributor

jmervine commented Dec 1, 2014

Okay, this should now be updated at "http://maxcdn.bootstrapcdn.com/data/bootstrapcdn.json". Follow #463 for progress on making this a dynamic endpoint.

J

@jmervine jmervine closed this as completed Dec 1, 2014
@jmervine jmervine reopened this Dec 1, 2014
@jmervine
Copy link
Contributor

jmervine commented Dec 1, 2014

Keeping this open while #463 is in progress.

jmervine added a commit that referenced this issue Dec 2, 2014
[#460] Adding dynamic json endpoint.
jmervine added a commit that referenced this issue Dec 3, 2014
Release #460; dynamic json data
@jmervine jmervine closed this as completed Dec 3, 2014
jmervine pushed a commit that referenced this issue Feb 24, 2015
jmervine added a commit that referenced this issue Feb 24, 2015
[#460] Adding dynamic json endpoint.
jmervine added a commit that referenced this issue Feb 24, 2015
Release #460; dynamic json data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants