Need to integrate any of the studio endpoints on your website quickly? You might be looking for AstronomyAPI Widgets.
Bare minimum
Widgets script can be loaded to your webpage by including a script tag inside the <HEAD></HEAD> tags, as shown below. Make sure to update the yourEncryptedAuthString with the base64 string you created as mentioned in the authentication instructions. Notice how the string should not include the term Basic.
The client instance is created using new AstronomyAPI({...options}). The parameter basicToken is required to initiate the class.
All methods follow the same payload body as the moon phase or star chart API with an optional parameter element which can be used to attach a custom HTML element instead of the default element selector.
A callback function can be passed as the second parameter for each method. The callback function will be passed with the original response received from the API.