« API » : différence entre les versions

An alternative space dedicated to technology and culture at Charleroi.
Aller à la navigation Aller à la recherche
(→‎/space : +doc)
(→‎Design API Documentation : /header and /footer content parameter is modified ; /header documentation)
 
(4 versions intermédiaires par un autre utilisateur non affichées)
Ligne 4 : Ligne 4 :


= API Documentation =
= API Documentation =
== /pads ==
* '''Purpose:''' Returns a list of the pads on the Wolfplex Etherpad installation
* '''URL:''' {{api|pads}}
* '''Method:''' GET
* '''Parameters:'''
** format=json|raw|txt (default: json) — Output format


== /space ==
== /space ==
* '''Purpose:''' Returns a JSON document compliant with [http://spaceapi.net/ Space API] ([http://spaceapi.net/documentation format documentation)]
* '''URL:''' {{api|space}}
* '''URL:''' {{api|space}}
* '''Method:''' GET
* '''Method:''' GET
* '''Parameters:''' none
* '''Parameters:''' none
* '''Purpose:''' Returns a JSON document compliant with [http://spaceapi.net/ Space API] ([http://spaceapi.net/documentation format documentation)]
 
= Design API Documentation =
 
== /design/header ==
* '''Purpose:''' Serves a header HTML code to add in a Wolfplex document
* '''URL:''' {{api|design/header}}
* '''Optional parameters:'''
** accent=<accent name> — Accent selection (see /design/kibaone/accents)
** content=html-with-css|html|css — Code selection
*** content=html-with-css — returns the full header HTML code, with a HTML5-compliant scoped <style> block. [by default]
*** content=css — returnes only the CSS code
*** content=html — returns only the HTML code
** framework=bootstrap2|foundation5
*** without this parameter — returns a code not defendant of a front-end framework, with custom columns widths hardcoded
*** framework=bootstrap2 — returns a code optimized for BootStrap 2.32 (Kiba One is first prepared for Foundation, then adjusted for BootStrap)
*** framework=foundation5 — returns a code optimized for Foundation 5
* '''Current implementation notes:'''
** Framework parameter is validated, but otherwise ignored: we output in each case an <nowiki><header></nowiki> element, with a width of 100%.
** The default accent is bluegray.
 
== /design/footer ==
''Not yet available.''
* '''Purpose:''' Serves a footer HTML code to add in a Wolfplex document
* '''URL:''' {{api|design/footer}}
* '''Optional parameters:'''
** content=html-with-css|html|css|html-common-column — Code selection
*** content=html-with-css — returns the full footer HTML code, with a HTML5-compliant scoped <style> block.
*** content=css — returnes only the CSS code
*** content=html — returns the full footer HTML code
*** content=html-common-column — returns the HTML code for the content of the second footer column, allowing you to personalize the 3 others
** framework=bootstrap2|foundation5
*** without this parameter — returns a code not defendant of a front-end framework, with custom columns widths hardcoded
*** framework=bootstrap2 — returns a code optimized for BootStrap 2.32 (Kiba One is first prepared for Foundation, then adjusted for BootStrap)
*** framework=foundation5 — returns a code optimized for Foundation 5
 
== /design/kibaone ==
This provides features specific to the Kiba One theme (see also [[Kiba]]).
 
=== /design/kibaone/accents ===
* '''Purpose:''' Returns a JSON document with a listing of Kiba One accents.
* '''URL:''' {{api|design/kibaone/accents}}
* '''Method:''' GET
* '''Parameters:''' none
* '''Format:''' An array of object, each one having 3 properties:
** '''name''': the accent name
** '''accent''': the background color
** '''headingColor''': the heading color

Version actuelle datée du 12 février 2014 à 02:14

To provide data about Wolfplex, we offer an API.

Domain: http://api.wolfplex.be/

API Documentation

/pads

  • Purpose: Returns a list of the pads on the Wolfplex Etherpad installation
  • URL: http://api.wolfplex.be/pads
  • Method: GET
  • Parameters:
    • format=json|raw|txt (default: json) — Output format

/space

Design API Documentation

/design/header

  • Purpose: Serves a header HTML code to add in a Wolfplex document
  • URL: http://api.wolfplex.be/design/header
  • Optional parameters:
    • accent=<accent name> — Accent selection (see /design/kibaone/accents)
    • content=html-with-css|html|css — Code selection
      • content=html-with-css — returns the full header HTML code, with a HTML5-compliant scoped <style> block. [by default]
      • content=css — returnes only the CSS code
      • content=html — returns only the HTML code
    • framework=bootstrap2|foundation5
      • without this parameter — returns a code not defendant of a front-end framework, with custom columns widths hardcoded
      • framework=bootstrap2 — returns a code optimized for BootStrap 2.32 (Kiba One is first prepared for Foundation, then adjusted for BootStrap)
      • framework=foundation5 — returns a code optimized for Foundation 5
  • Current implementation notes:
    • Framework parameter is validated, but otherwise ignored: we output in each case an <header> element, with a width of 100%.
    • The default accent is bluegray.

/design/footer

Not yet available.

  • Purpose: Serves a footer HTML code to add in a Wolfplex document
  • URL: http://api.wolfplex.be/design/footer
  • Optional parameters:
    • content=html-with-css|html|css|html-common-column — Code selection
      • content=html-with-css — returns the full footer HTML code, with a HTML5-compliant scoped <style> block.
      • content=css — returnes only the CSS code
      • content=html — returns the full footer HTML code
      • content=html-common-column — returns the HTML code for the content of the second footer column, allowing you to personalize the 3 others
    • framework=bootstrap2|foundation5
      • without this parameter — returns a code not defendant of a front-end framework, with custom columns widths hardcoded
      • framework=bootstrap2 — returns a code optimized for BootStrap 2.32 (Kiba One is first prepared for Foundation, then adjusted for BootStrap)
      • framework=foundation5 — returns a code optimized for Foundation 5

/design/kibaone

This provides features specific to the Kiba One theme (see also Kiba).

/design/kibaone/accents

  • Purpose: Returns a JSON document with a listing of Kiba One accents.
  • URL: http://api.wolfplex.be/design/kibaone/accents
  • Method: GET
  • Parameters: none
  • Format: An array of object, each one having 3 properties:
    • name: the accent name
    • accent: the background color
    • headingColor: the heading color