filters
フィルターの追加と管理
get
View all filters
戻り値: Filter
OAuth: User token + read:filters
実装履歴:
- 2.4.3 - 追加
リクエスト
ヘッダ
string
レスポンス
200: Success
Excerpts of various filters in different contexts.
[
{
"id": "6191",
"phrase": ":eurovision2019:",
"context": [
"home"
],
"whole_word": true,
"expires_at": "2019-05-21T13:47:31.333Z",
"irreversible": false
},
...
{
"id": "5580",
"phrase": "@twitter.com",
"context": [
"home",
"notifications",
"public",
"thread"
],
"whole_word": false,
"expires_at": null,
"irreversible": true
},
...
]
401: Unauthorized
Invalid or missing Authorization header
{
"error": "The access token is invalid"
}
get
View a single filter
戻り値: Filter
OAuth: User token + read:filters
実装履歴:
- 2.4.3 - 追加
リクエスト
パス
string
ヘッダ
string
レスポンス
200: Success
Filter returned successfully
{
"id": "8449",
"phrase": "test",
"context": [
"home",
"notifications",
"public",
"thread"
],
"whole_word": false,
"expires_at": "2019-11-26T09:08:06.254Z",
"irreversible": true
}
401: Unauthorized
Invalid or missing Authorization header
{
"error": "The access token is invalid"
}
404: Not Found
Filter ID does not exist, or is not owned by you
{
"error": "Record not found"
}
post
Create a filter
戻り値: Filter
OAuth: User token + write:filters
実装履歴:
- 2.4.3 - 追加
リクエスト
ヘッダ
string
フォームのパラメータ
string
array
home
, notifications
, public
, thread
. At least one context must be specified.
boolean
boolean
string
レスポンス
200: Success
The newly-created filter will be returned.
{
"id": "8449",
"phrase": "test",
"context": [
"home",
"notifications",
"public",
"thread"
],
"whole_word": false,
"expires_at": "2019-11-26T09:08:06.254Z",
"irreversible": true
}
401: Unauthorized
Invalid or missing Authorization header
{
"error": "The access token is invalid"
}
422: Unprocessable Entity
If phrase or context are not provided properly
phrase
{
"error": "Validation failed: Phrase can't be blank"
}
context
{
"error": "Validation failed: Context can't be blank, Context None or invalid context supplied"
}
put
Update a filter
戻り値: Filter
OAuth: User token + write:filters
実装履歴:
- 2.4.3 - 追加
リクエスト
パス
string
ヘッダ
string
フォームのパラメータ
string
array
home
, notifications
, public
, thread
. At least one context must be specified.
boolean
boolean
string
レスポンス
200: Success
Filter updated successfully
{
"id": "8449",
"phrase": "test",
"context": [
"home",
"notifications",
"public",
"thread"
],
"whole_word": false,
"expires_at": null,
"irreversible": true
}
401: Unauthorized
Invalid or missing Authorization header
{
"error": "The access token is invalid"
}
404: Not Found
The filter does not exist or is not owned by you
{
"error": "Record not found"
}
422: Unprocessable Entity
If phrase or context are not provided properly
phrase
{
"error": "Validation failed: Phrase can't be blank"
}
context
{
"error": "Validation failed: Context can't be blank, Context None or invalid context supplied"
}
delete
Remove a filter
戻り値: Filter
OAuth: User token + write:filters
実装履歴:
- 2.4.3 - 追加
リクエスト
パス
string
ヘッダ
string
レスポンス
200: Success
The filter has been deleted successfully, so an empty object will be returned.
{}
401: Unauthorized
Invalid or missing Authorization header
{
"error": "The access token is invalid"
}
404: Not Found
The filter does not exist or is not owned by you
{
"error": "Record not found"
}
最終更新 July 1, 2020 · このページを改善する
他の言語:
English