diff --git a/website/posts/20240409-API-Documentation.html b/website/posts/20240409-API-Documentation.html index d419713..fd7f099 100644 --- a/website/posts/20240409-API-Documentation.html +++ b/website/posts/20240409-API-Documentation.html @@ -2,7 +2,7 @@ - + @@ -16,21 +16,39 @@ Return to enstrayed.com

API Documentation

-

This page was last updated 2024-08-20.

+

This page was last updated 2025-04-26.

Source Code & Issue Tracker: github.com/enstrayed/enstrayedapi


+
+

Important Note

+
+ +

Multiple API endpoints are being rewritten/added, especially relating to authentication & authorization, as part of a database change to Postgres. These changes are being made in the new-db branch.

+

/api/nowplaying

nowplaying.js - GET +
+ GET +

Returns whatever I'm listening to via the Last.fm API in JSON. If ?format=html is used in the URL it will return the same but in HTML. If nothing is playing the JSON response will just have "playing": false.

+
+

/api/nowplayingbeta

+ nowplaying.js +
+ GET +
+
+ +

Beta verison of the /nowplaying endpoint. This version will change frequently but presently queries my Jellyfin for what I'm listening to and will return that as JSON. If ?format=html is appended to the URL it will return the same but in HTML. Each line in the HTML response has a class nowPlayingLine[1-4] that can be used to style the text using CSS. See libnowplaying.js:63 for the format of the result.

+

/api/etyd/*

etyd.js @@ -55,7 +73,9 @@

/api/sendemail

mailjet.js - POST +
+ POST +

Sends an email to the specified recipient, intended for application & automation use.

@@ -74,7 +94,7 @@

/api/ip

ip.js - GET +
GET

Returns the IP, country and Cloudflare ray of the request in JSON.

@@ -82,7 +102,7 @@

/api/headers

ip.js - GET +
GET

Returns all request headers in JSON.

diff --git a/website/static/newposts.css b/website/static/newposts.css new file mode 100644 index 0000000..55c79f7 --- /dev/null +++ b/website/static/newposts.css @@ -0,0 +1,42 @@ +html { + display: grid; + place-items: center; + background-color: #282828; +} + +body { + margin: 2em 0 0 0; + font-family: 'Segoe UI Variable', sans-serif; + + background-color: #202020; + color: #F1F1F1; + + max-width: 80ch; + padding: 2em; +} + +a, a:link { + color: #FF5A36; +} + +a:hover { + color: #ff8266; +} + +.inlineheader { + display: flex; + align-items: center; + margin-top: 2rem; + gap: 1em; + flex-wrap: wrap; +} + +.inlineheader h2 { + margin: 0; +} + +.inlineheader > div > span { + padding: 0.2rem; + color: white; + background-color: #f06445; +} \ No newline at end of file diff --git a/website/templates/markdownposttemplate.html b/website/templates/markdownposttemplate.html index cbcf96e..a34529f 100644 --- a/website/templates/markdownposttemplate.html +++ b/website/templates/markdownposttemplate.html @@ -2,16 +2,18 @@ - + - + <!--SSR_REPLACE_TITLE--> + + diff --git a/website/templates/newindextemplate.html b/website/templates/newindextemplate.html index c7ce888..3c9ab4a 100644 --- a/website/templates/newindextemplate.html +++ b/website/templates/newindextemplate.html @@ -3,7 +3,15 @@ - Enstrayed + Enstrayed.com + + + + + + + +