From e7249762d0d90ce9028e633482b8976eec06e86b Mon Sep 17 00:00:00 2001 From: ubq323 Date: Wed, 20 Jul 2022 19:27:03 +0100 Subject: add documentation for api and things --- doc.txt | 39 +++++++++++++++++++++++++++++++++++++++ oldindex.html | 1 + 2 files changed, 40 insertions(+) create mode 100644 doc.txt diff --git a/doc.txt b/doc.txt new file mode 100644 index 0000000..32f9ad9 --- /dev/null +++ b/doc.txt @@ -0,0 +1,39 @@ +GEORGE documentation +last updated 2022-07-20 + +GET https://george.gh0.pw/data.cgi +returns a json array of current GEORGE members. +the order of members in the array is the order used for calculating NEXT and PREV links. +each item in the array is an object with name, link, colour, and is_council fields. the meaning of these should be obvious. + +--- + +GET https://george.gh0.pw/embed.cgi?membername +GET https://george.gh0.pw/embed.cgi?membername&key1=val1[&...] +returns the GEORGE navigation widget, suitable for being embedded as an iframe on the page of the GEORGE member with name membername. +addional options may be provided as key-value pairs. currently these are used for changing some style values. the presently supported options are: +key default description +c_bg white background colour of the widget +c_george #3d3db8 text colour of the word "GEORGE" +c_links blue text colour of the NEXT and PREV links +c_underline blue underline colour of the word "GEORGE" +c_fg black text colour of all other text + +it is recommended that you embed the widget using an iframe tag like this: + +the sandbox attribute is strictly speaking not required, since we set a CSP header with the same value on the server as well. it probably doesn't hurt to include it anyway, though. + +on the serverside we check the http Referer header, if one is present, to ensure that the embed widget for a given member can only be embedded on that member's site. we also set a CSP frame-ancestors directive, with a similar effect. + +the pulsating animation on the word "GEORGE" is disabled if the CSS prefers-reduced-motion media query is active. + +--- + +GET https://coral.shoes/george-status/george-status-json +returns current status information about the GEORGE webring, including which members currently haven't correctly embedded the GEORGE widget onto their page. + +=== + +the GEORGE source code is at https://g.gh0.pw/george.site/ +the GEORGE status source code is at https://github.com/loovjo/shoe-router/tree/master/george-status + diff --git a/oldindex.html b/oldindex.html index e24bad6..2f920a7 100644 --- a/oldindex.html +++ b/oldindex.html @@ -87,6 +87,7 @@ a{color:cyan}
  • GEORGE forum on apioforum
  • GEORGE irc channel (#g on apionet)
  • GEORGE xmpp MUC (george@conference.ubq323.website)
  • +
  • GEORGE api and embedding documentation
  • -- cgit v1.2.3