Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (56 sloc) 1.55 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Lista de canciones </title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div id="app" class="container">
<h1> Lista de canciones </h1>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col"> Juego </th>
<th scope="col"> Género </th>
<th scope="col"> Valoración </th>
</tr>
</thead>
<tbody>
<tr v-for="i in lista">
<td> {{ i.gsx$juego.$t }} </td>
<td> {{ i.gsx$genero.$t }} </td>
<td> {{ i.gsx$valoracion.$t }} </td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.js"></script>
<script>
new Vue({
el: '#app',
data: function(){
return {
lista: []
}
},
created: function(){
this.getData();
},
methods: {
getData: function(){
let that = this;
axios.get('https://spreadsheets.google.com/feeds/list/1oPY11-w0o6ac_kXlqyhbJ8onYxIlZ-zA0NqBziTl3KQ/od6/public/values?alt=json')
.then(function(response){
that.lista = response.data.feed.entry
})
.catch(function(){
alert('Error')
})
}
}
});
</script>
</body>
</html>
You can’t perform that action at this time.