안녕하세요. API를 사용하는 데 익숙하지 않고 cineworld API에서 정보를 얻으려는 데 문제가 있습니다. 아무도 사용하지 않았습니다.cineworld api 정보 blank
여기에 나와있는 예가 있지만 정보를 가져올 수 없습니다.
<script>
$(document).ready(function() {
$('a.retrieve').click(function() {
$.ajax({
url: '/api/quickbook/films',
type: 'GET',
data: {key: 'qUnEyRXt', full: true, cinema: 33},
dataType: 'jsonp', // Setting this data type will add the callback parameter for you
success: parseFilms
});
});
$('a.clear').click(function() {
$('span.film.count').text('0');
$('ol.film.list').empty();
});
});
function parseFilms(response, status) {
var html = '';
// Check for errors from the server
if (response.errors) {
$.each(response.errors, function() {
html += '<li>' + this + '</li>';
});
} else {
$('span.film.count').text(response.films.length);
$.each(response.films, function() {
html += '<li>' + this.title + ' (' + this.classification + ')</li>';
});
}
// Faster than doing a DOM call to append each node
$('ol.film.list').append(html);
}
</script>
웹 documation 링크가 실제로
+1에게 있습니다 : 여기
는$.ajax()
에을 통과하고있는 URL입니다. 감사. –api 키를 넣으시겠습니까? – Chris2048