API v1 PUT Contribution Repost - SpaceFlow/Backend GitHub Wiki

POST /v1/contribution/repost/:contribution_id

Repost a contribution (or also known "repost")

Required scope: post_for_user

Authorisation needed: yup

Parameters:

Type name description required
URL Parameter (just look at the endpoint url) Contribution ID you want to repost Yes

Potential Errors:

Error Code HTTP Status Code Description
APP_ID_NOT_FOUND 400 The API Server couldn't find the to the token associated application id
REQUIRED_SCOPE_NOT_SET 400 The token wasn't created with the scope required for this endpoint
TOKEN_NOT_FOUND 400 An invalid token was supplied in the authorisation header
AUTHORISATION_HEADER_NOT_PRESENT 400 should be self-explanatory
CONTRIBUTION_NOT_FOUND 404 The post couldn't be found in the database

Example:

PUT https://api.spaceflow.io/v1/contribution/repost/1337

Returns:

{
    "repost": repost,
    "content": "nice memes guys",
    "mentioned_users": "simlply,the,list,you,supplied",
    "using_app": {
        "id": 420,
        "app_name": "Memeposter Client"
    },
    "by_user": user object of the user the original contribution was made by,
    "repost_by_user": your user object,
    "timestamp": 12345234,
    "contribution_id": 1234,
    "error": null
}