Calendar API

INTRO

API documentation of https://foutaise.org/cal/

GET https://foutaise.org/cal/api/help

Display this API documentation.

Response

text/html

POST https://foutaise.org/cal/api/apikeys/add

Add an apikey.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

Request data

apikey: string (required)

Apikey to add.

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        -X POST \
        https://foutaise.org/cal/api/apikeys/add \
        -d "apikey=<apikey-to-add>"

POST https://foutaise.org/cal/api/apikeys/del

Delete an apikey.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

Request data

apikey: string (required)

Apikey to delete.

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        -X POST \
        https://foutaise.org/cal/api/apikeys/del \
        -d "apikey=<apikey-to-delete>"

DELETE https://foutaise.org/cal/api/events/{eventid}

Delete a calendar event.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

URI parameter

eventid: uint (required)

Id of the event to delete.

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        -X DELETE \
        https://foutaise.org/cal/api/events/42

POST https://foutaise.org/cal/api/events

Add a calendar event.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

Request data

title: string (required)

Title of the event.

date: string (required, format: yyyy-mm-dd)

Date of the event.

begin_hour: string (required, format: hh:mm)

Begin hour of the event.

end_hour: string (required, format: hh:mm)

End hour of the event.

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        -X POST \
        -d "date=2021-04-11" \
        -d "title=test" \
        -d "begin_hour=08:00" \
        -d "end_hour=09:00" \
        https://foutaise.org/cal/api/events

POST https://foutaise.org/cal/api/events/{eventid}

Edit a calendar event.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

URI parameter

eventid: uint (required)

Id of the event to edit.

Request data

title: string (required)

Title of the event.

date: string (required, format: yyyy-mm-dd)

Date of the event.

begin_hour: string (required, format: hh:mm)

Begin hour of the event.

end_hour: string (required, format: hh:mm)

End hour of the event.

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        -X POST \
        -d "date=2021-04-11" \
        -d "title=test" \
        -d "begin_hour=08:00" \
        -d "end_hour=09:00" \
        https://foutaise.org/cal/api/events/42

GET https://foutaise.org/cal/api/events

List future calendar events.

Request header

Authorization (required)

The Authorization header must start with Apikey, followed by the user's API Key.

Response

application/json: array of objects with the following properties

    {
        eventid:    uint,
        title:      string,
        date:       string,
        begin_hour: string,
        end_hour:   string
    }

Example

    curl -H "Authorization: Apikey <your-api-key>" \
        https://foutaise.org/cal/api/events