사용자
Cernium/ACLGroup/api(r7판 Blame)
| r7 | ||
|---|---|---|
| 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 | 7 | https://theseed.io/thread/YummyGiganticBrashDistribution |
| r4 | 8 | [[https://theseed.io/thread/YummyGiganticBrashDistribution|#]] |
| 9 | ||
| r5 | 10 | https://theseed.io/internal/admin/thread/YummyGiganticBrashDistribution/hide |
| 11 | ||
| r7 | 12 | == 기본 == |
| r5 | 13 | {{{#!syntax python |
| r7 | 14 | import requests |
| 15 | import json | |
| 16 | ||
| r5 | 17 | headers = { |
| r6 | 18 | 'Authorization': 'Bearer API_TOKEN_HERE' |
| 19 | } | |
| r7 | 20 | }}} |
| 21 | ||
| 22 | == 목록 == | |
| 23 | ||
| 24 | == 추가 == | |
| 25 | {{{#!syntax python | |
| r5 | 26 | data = { |
| r7 | 27 | 'group': '로그인 허용 차단', #ACLGroup 이름 |
| 28 | 'username': 'Cernium', #사용자 이름; mode=ip이면 'ip'로 | |
| 29 | 'note': 'api test', #사유 | |
| 30 | 'expire': '20', #추가할 시간(초) | |
| 31 | 'mode': 'username' #ip OR username | |
| r6 | 32 | } |
| r5 | 33 | response = requests.post('https://theseed.io/api/v0/aclgroup', headers=headers, data=data) |
| r7 | 34 | }}} |
| 35 | ||
| 36 | == 제거 == | |
| 37 | {{{#!syntax python | |
| 38 | data = { | |
| 39 | 'group': '경고-테스트', #ACLGroup 이름 | |
| 40 | 'id': '14559', #차단 id | |
| 41 | 'note': 'api test' #사유 | |
| 42 | } | |
| 43 | response = requests.delete('https://theseed.io/api/v0/aclgroup', headers=headers, data=data) | |
| r5 | 44 | }}} |