OpenIsle Docs
API 概览
List posts GET Create post POST
List donations GET Donate POST
Api
Posts
Postid
Donations

# Donate

Donate points to the post author

POST
/`api`/`posts`/`{postId}`/`donations`

## Authorization

Authorization Bearer <token>

In: `header`

## Path Parameters

postId integer
Format `int64`

## Request Body

amount?integer
Format `int32`

## Response Body

###

    curl -X POST "https://www.open-isle.com/api/posts/0/donations" \  -H "Content-Type: application/json" \  -d '{}'

    {
      "totalAmount": 0,
      "donations": [
        {
          "userId": 0,
          "username": "string",
          "avatar": "string",
          "amount": 0,
          "createdAt": "2019-08-24T14:15:22Z"
        }
      ],
      "balance": 0
    }

List donations GET

Previous Page

React to post POST

Next Page

    curl -X POST "https://www.open-isle.com/api/posts/0/donations" \
      -H "Content-Type: application/json" \
      -d '{}'