commit
7a6e74691f
@ -0,0 +1,19 @@ |
||||
Using this as a Gist equivalent. |
||||
|
||||
```javascript |
||||
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) |
||||
}) |
||||
}) |
||||
}) |
||||
``` |
Loading…
Reference in new issue