본문으로 건너뛰기
사용자

Cernium/ACLGroup/api(r8판 Blame)

r8
r1
1[include(틀:상위 문서, 문서명1=사용자:Cernium/ACLGroup)]
2----
3{{{GET /api/v0/aclgroup}}}
4{{{PUT /api/v0/aclgroup}}}
r2
5{{{DELETE /api/v0/aclgroup}}}
6
r3
7https://theseed.io/thread/YummyGiganticBrashDistribution
r4
8[[https://theseed.io/thread/YummyGiganticBrashDistribution|#]]
9
r5
10https://theseed.io/internal/admin/thread/YummyGiganticBrashDistribution/hide
11
r7
12== 기본 ==
r5
13{{{#!syntax python
r7
14import requests
15import json
16
r5
17headers = {
r6
18 'Authorization': 'Bearer API_TOKEN_HERE'
19}
r7
20}}}
21
22== 목록 ==
r8
23{{{#!syntax python
24data = {
25 'group': '인증된 사용자'
26}
r7
27
r8
28response = requests.get('https://theseed.io/api/v0/aclgroup?from=12029', headers=headers, data=data) #?from=12029는 제거해도 됨
29print(response.text)
30}}}
31
r7
32== 추가 ==
33{{{#!syntax python
r5
34data = {
r7
35 'group': '로그인 허용 차단', #ACLGroup 이름
36 'username': 'Cernium', #사용자 이름; mode=ip이면 'ip'로
37 'note': 'api test', #사유
38 'expire': '20', #추가할 시간(초)
39 'mode': 'username' #ip OR username
r6
40}
r5
41response = requests.post('https://theseed.io/api/v0/aclgroup', headers=headers, data=data)
r7
42}}}
43
44== 제거 ==
45{{{#!syntax python
46data = {
47 'group': '경고-테스트', #ACLGroup 이름
48 'id': '14559', #차단 id
49 'note': 'api test' #사유
50}
51response = requests.delete('https://theseed.io/api/v0/aclgroup', headers=headers, data=data)
r5
52}}}