Skip to content

Instantly share code, notes, and snippets.

@brianglass
Last active February 23, 2023 17:56
Show Gist options
  • Save brianglass/8e8f9f4ea9543911198bd6edf74dd77b to your computer and use it in GitHub Desktop.
Save brianglass/8e8f9f4ea9543911198bd6edf74dd77b to your computer and use it in GitHub Desktop.
Example of how to use the orthocal.info api
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1 id="title"></h1>
<p id="fast"></p>
<p id="readings"></p>
<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script>
$(document).ready(function() {
$.ajax('https://orthocal.info/api/gregorian/').done(function (data) {
$('#title').text(data.summary_title);
$('#fast').text(data.fast_level_desc + ' — ' + data.fast_exception_desc);
$('#readings').text(data.readings.map(r => r.display).join('; '))
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment