1
Home
Fabien Benetou edited this page 2 years ago
Using this as a Gist equivalent.
fetch('https://video.benetou.fr/api/v1/videos?count=100')
.then(function(response) {
return response.json()
}).then(function(data) {
console.log(data.data)
data.data.map( v => {
fetch('https://video.benetou.fr/api/v1/videos/'+v.id)
.then(function(response) {
if (response.status == 200) { return response.json() }
else return null
}).then(function(data) {
if (data && data.tags && data.tags.length > 0) console.log(data.name, data.id, data.tags)
})
})
})