Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Subscriptions to activities

MaurICT edited this page Apr 9, 2020 · 7 revisions

Get subscriptions

GET /api/subscriptions

Example response:

{
    "status": "success",
    "count": 1,
    "subscriptions": [
        {
            "activity": null,
            "eventID": 24,
            "factured": false,
            "drinksCost": 1.50,
            "friendCount": 0
        }
    ]
}

Add subscription to an activity

POST /api/subscriptions/add

Parameters

Form data eventId (required): The activity you want to subscribe to

Form data friendCount (optional): The amount of friends. Default is 0

Example request:

POST /api/subscription/add HTTP/1.1
Host: https://stoverstag.nl
Content-Type: application/x-www-form-urlencoded (You can also use multipart/form-data)
Content-Length: 24

eventId=25&friendCount=1

Example response:

{
   "status": "success"
}

Remove subscription from an activity

POST /api/subscriptions/remove

Parameters

Form data eventId (required): The activity you unsubscribe

Example request:

POST /api/subscription/remove HTTP/1.1
Host: https://stoverstag.nl
Content-Type: application/x-www-form-urlencoded (You can also use multipart/form-data)
Content-Length: 10

eventId=25

Example response:

{
   "status": "success"
}
Clone this wiki locally