portail tube stats calling api not rss
This commit is contained in:
parent
f79fb7d80e
commit
e50de1e1f2
2 changed files with 7 additions and 7 deletions
|
@ -10,7 +10,7 @@ wget -O ./site/data/wiki.json https://wiki.crapaud-fou.org/stats.php
|
||||||
wget -O ./site/data/rencontres.json https://wiki.crapaud-fou.org/rencontres.php
|
wget -O ./site/data/rencontres.json https://wiki.crapaud-fou.org/rencontres.php
|
||||||
|
|
||||||
# tube
|
# tube
|
||||||
wget -O ./site/data/tube.json "https://tube.crapaud-fou.org/feeds/videos.json?sort=-publishedAt&filter=local"
|
wget -O ./site/data/tube.json "https://tube.crapaud-fou.org/api/v1/videos?sort=-publishedAt&isLocal=1&count=10"
|
||||||
|
|
||||||
# chat
|
# chat
|
||||||
# wget -O ./site/data/chat_stat_monthly.json https://idees.crapaud-fou.org/data/chat_stat_monthly.json
|
# wget -O ./site/data/chat_stat_monthly.json https://idees.crapaud-fou.org/data/chat_stat_monthly.json
|
||||||
|
|
|
@ -108,17 +108,17 @@ $(document).ready(function() {
|
||||||
|
|
||||||
// cratube
|
// cratube
|
||||||
$.getJSON("data/tube.json", function(data) {
|
$.getJSON("data/tube.json", function(data) {
|
||||||
$.each(data.items.slice(0, 10), function(index, video) {
|
$.each(data.data.slice(0, 10), function(index, video) {
|
||||||
var link = $("<a>")
|
var link = $("<a>")
|
||||||
.attr("href", video.url)
|
.attr("href", "https://tube.crapaud-fou.org/w/" + video.shortUUID)
|
||||||
.attr("class", "list-item")
|
.attr("class", "list-item")
|
||||||
.attr("title", video.title)
|
.attr("title", video.name)
|
||||||
.text(video.title);
|
.text(video.name);
|
||||||
var li = $("<li>").append(link);
|
var li = $("<li>").append(link);
|
||||||
$(".tube ul").append(li);
|
$(".tube ul").append(li);
|
||||||
$(".lastvideo")
|
$(".lastvideo")
|
||||||
.attr("src", data.items[0].id.replace("watch", "embed"))
|
.attr("src", "https://tube.crapaud-fou.org/" + data.data[0].embedPath)
|
||||||
.attr("title", data.items[0].title);
|
.attr("title", data.data[0].name);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue