Last active
February 23, 2023 17:56
-
-
Save brianglass/8e8f9f4ea9543911198bd6edf74dd77b to your computer and use it in GitHub Desktop.
Example of how to use the orthocal.info api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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