こんにちは、API を使用するのは初めてで、cineworld API から情報を取得しようとして問題が発生しています。誰もそれを使用したことがあります。
ここに彼らが与える例がありますが、そこから情報を引き出すことはできませんか?
<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>
Web ドキュメントのリンクはhttps://www.cineworld.co.uk/developer/jqueryです
どんな助けやアドバイスも大いに感謝します