Comments (6)
The index file http://api.jsdelivr.com/v1/jsdelivr/ shows all included CDNs.
I don't see it here:
{
"libraries": {
"name": {
"type": "String"
},
"zip": {
"type": "String"
},
"mainfile": {
"type": "String"
},
"mainfile2": {
"type": "String"
},
"lastversion": {
"type": "String"
},
"description": {
"type": "String"
},
"homepage": {
"type": "String"
},
"github": {
"type": "String"
},
"author": {
"type": "String"
},
"versions": {},
"assets": {
"type": "Mixed"
},
"created": {
"type": "Date"
}
}
}
date the the data files were last updated
Good idea! Perhaps with v2 when we can get all CDN info in one giant JSON file?
Workaround: There is a created
field in each project. For example:
http://api.jsdelivr.com/v1/bootstrap/libraries/twitter-bootstrap
http://api.jsdelivr.com/v1/jsdelivr/libraries/bootstrap
I assume that is when the last written scan of the CDN's project was. (I assume you are looking for how recent the entire CDN data is?)
Does not mean that CDN has the latest version of the file. For example, I've seen Google's CDN be 3 days late with a jQuery update due to it coming on a Friday afternoon before a 3-day US holiday, while CDNJS had it in hours. So Google was up to v1.7.2 when CDNJS had v1.8.0
Workaround-workaround: jsDelivr has version aliasing. Unofficially we don't recommend latest
since an API change can automatically break something. But a point release alias is considered safe since they're normally small fixes & tweaks. EG: //cdn.jsdelivr.net/bootstrap/3.2/js/bootstrap.js
will serve v3.2.0 now, & the bugfix v3.2.1 if/when released.
from api.
@UnbounDev Can we add this data? How often do we purge the CDN? If this data stays cached then it will be useless and no point adding it in the first place
from api.
The lokijs db we're using includes a meta
field, e.g.
// http://api.jsdelivr.com/v1/jsDelivr/libraries/imagesloaded
// =>
{
...,
"meta": {
"revision": 35,
"created": 1433183937543,
"version": 0,
"updated": 1433204947949
},
"$loki": 465
}
where created
/updated
are timestamps relating to when that particular project was initalized/updated w/i the api - is that sufficient or is it desirable to have a 'master' meta file?
from api.
Yes but how often do we purge the CDN cache?
from api.
@jimaek after each sync cycle (~10 minutes)
from api.
Hmm then I guess this issue is fixed. @UnbounDev Can you note somewhere to make sure we document this feature?
from api.
Related Issues (20)
- Version sorting HOT 10
- API returns no versions (urgent) HOT 5
- Move the API away from AppFog HOT 8
- Am I right to assume that I cannot get data for multiple librarys with one api call? HOT 4
- Searching by URL HOT 1
- jQuery failed to update latest beta1 HOT 2
- File paths HOT 14
- Incorrect author format for some CDNJS projects HOT 3
- pagination need? HOT 3
- The result order is not right HOT 3
- Default filename for specified version HOT 8
- API is not detecting new projects HOT 2
- Specify Content Security Policy? HOT 1
- API future HOT 3
- Add SRI to API HOT 1
- Add a download/hit count to the API HOT 7
- API endpoint down? HOT 2
- "bootstrap" alias is gone in v1 HOT 7
- Remove X-Requested-With
- Make sure logentries is utilized HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.