From 4445682f90ca2984a5927b96bb63f1169e0c7560 Mon Sep 17 00:00:00 2001 From: Drew Fitzpatrick Date: Tue, 11 Sep 2018 15:12:51 -0400 Subject: [PATCH] Add endorsements documentation. (#705) --- Using-the-API/API.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Using-the-API/API.md b/Using-the-API/API.md index 3dd34393..ca3289ac 100644 --- a/Using-the-API/API.md +++ b/Using-the-API/API.md @@ -10,6 +10,7 @@ API overview - [Apps](#apps) - [Blocks](#blocks) - [Domain blocks](#domain-blocks) + - [Endorsements](#endorsements) - [Favourites](#favourites) - [Filters](#filters) - [Follow Requests](#follow-requests) @@ -208,6 +209,13 @@ Returns the target account's [Relationship](#relationship). Returns the target account's [Relationship](#relationship). +#### Endorsing/unendorsing an account: + + POST /api/v1/accounts/:id/pin + POST /api/v1/accounts/:id/unpin + +Returns the target account's [Relationship](#relationship). + #### Getting an account's relationships: GET /api/v1/accounts/relationships @@ -317,6 +325,16 @@ Parameters: Returns an empty object. +### Endorsements + +#### Fetching a user's endorsed accounts + + GET /api/v1/endorsements + +Returns an array of [Accounts](#account) endorsed by the authenticated user. + +> **Note:** `max_id` and `since_id` for next and previous pages are provided in the `Link` header. However, it is possible to use the `id` of the returned objects to construct your own URLs. + ### Favourites #### Fetching a user's favourites: @@ -1024,6 +1042,7 @@ Most case client apps are compared to WebUI(JS), they should obey to JS implemen | `requested` | Whether the user has requested to follow the account | no | | `domain_blocking` | Whether the user is currently blocking the accounts's domain | no | | `showing_reblogs` | Whether the user's reblogs will show up in the home timeline | no | +| `endorsed` | Whether the user is currently endorsing the account | no | ### Report