From 51c61c151bd382ea913e7988e6ed28d73edcceb4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 5 Oct 2018 01:12:00 +0200 Subject: [PATCH] Add blocks API --- content/en/api/rest/blocks.md | 20 ++++++++++++++++++++ layouts/shortcodes/api_method_info.html | 10 ++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/content/en/api/rest/blocks.md b/content/en/api/rest/blocks.md index e7b82e95..68001187 100644 --- a/content/en/api/rest/blocks.md +++ b/content/en/api/rest/blocks.md @@ -5,3 +5,23 @@ menu: parent: api weight: 10 --- + +## GET /api/v1/blocks + +Returns array of [Account]({{< relref "entities.md#account" >}}) + +### Resource information + +{{< api_method_info auth="Yes" user="Yes" scope="read read:blocks follow" version="0.0.0" >}} + +### Parameters + +|Name|Description|Required|Default| +|----|-----------|:------:|:-----:| +| `max_id` | Return results older than ID | Optional || +| `since_id` | Return results newer than ID | Optional || +| `limit` | Maximum number of results | Optional | 40 | + +### Pagination + +{{< api_pagination >}} diff --git a/layouts/shortcodes/api_method_info.html b/layouts/shortcodes/api_method_info.html index d5db0b9b..9dfc9ce8 100644 --- a/layouts/shortcodes/api_method_info.html +++ b/layouts/shortcodes/api_method_info.html @@ -15,10 +15,12 @@ {{ .Get "user" }} - - Scope - {{ .Get "scope" }} - + {{ with .Get "scope" }} + + Scope + {{.}} + + {{ end }} Available since