mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00
Add domain blocks API
This commit is contained in:
parent
c9c516ee92
commit
86eb63bcf5
@ -1,7 +1,55 @@
|
|||||||
---
|
---
|
||||||
title: Domain blocks API
|
title: Domain blocks
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
parent: api
|
parent: rest-api
|
||||||
weight: 10
|
weight: 10
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## GET /api/v1/domain_blocks
|
||||||
|
|
||||||
|
Domains the user has blocked.
|
||||||
|
|
||||||
|
Returns array of string.
|
||||||
|
|
||||||
|
### Resource information
|
||||||
|
|
||||||
|
{{< api_method_info auth="Yes" user="Yes" scope="read read:blocks follow" version="0.0.0" >}}
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|Name|Description|Required|Default|
|
||||||
|
|----|-----------|:------:|:-----:|
|
||||||
|
| `limit` | Maximum number of results | Optional | 40 |
|
||||||
|
|
||||||
|
### Pagination
|
||||||
|
|
||||||
|
{{< api_pagination >}}
|
||||||
|
|
||||||
|
## POST /api/v1/domain_blocks
|
||||||
|
|
||||||
|
Block a domain to hide all public posts from it, all notifications from it, and remove all followers from it.
|
||||||
|
|
||||||
|
### Resource information
|
||||||
|
|
||||||
|
{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="0.0.0" >}}
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|Name|Description|Required|Default|
|
||||||
|
|----|-----------|:------:|:-----:|
|
||||||
|
| `domain` | Domain to block| Required ||
|
||||||
|
|
||||||
|
## DELETE /api/v1/domain_blocks
|
||||||
|
|
||||||
|
Remove a domain block.
|
||||||
|
|
||||||
|
### Resource information
|
||||||
|
|
||||||
|
{{< api_method_info auth="Yes" user="Yes" scope="write write:blocks follow" version="0.0.0" >}}
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|Name|Description|Required|Default|
|
||||||
|
|----|-----------|:------:|:-----:|
|
||||||
|
| `domain` | Domain to block| Required ||
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{{ with .Get "scope" }}
|
{{ with .Get "scope" }}
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align: left">Scope</th>
|
<th style="text-align: left">Scope</th>
|
||||||
<td><code>{{.}}</code></td>
|
<td>{{range split . " "}}<code>{{ . }}</code> {{ end }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user