사용자
Cernium/ACLGroup/api(비교)
| r6 vs r7 | ||
|---|---|---|
| ... | ... | |
| 9 | 9 | |
| 10 | 10 | https://theseed.io/internal/admin/thread/YummyGiganticBrashDistribution/hide |
| 11 | 11 | |
| 12 | == | |
| 12 | == 기본 == | |
| 13 | 13 | {{{#!syntax python |
| 14 | import requests | |
| 15 | import json | |
| 16 | ||
| 14 | 17 | headers = { |
| 15 | 18 | 'Authorization': 'Bearer API_TOKEN_HERE' |
| 16 | 19 | } |
| 20 | }}} | |
| 21 | ||
| 22 | == 목록 == | |
| 23 | ||
| 24 | == 추가 == | |
| 25 | {{{#!syntax python | |
| 17 | 26 | data = { |
| 18 | 'group': ' | |
| 19 | 'username': 'Cernium', | |
| 20 | 'note': 'api test', | |
| 21 | 'expire': '20', | |
| 22 | 'mode': 'username' | |
| 27 | 'group': '로그인 허용 차단', #ACLGroup 이름 | |
| 28 | 'username': 'Cernium', #사용자 이름; mode=ip이면 'ip'로 | |
| 29 | 'note': 'api test', #사유 | |
| 30 | 'expire': '20', #추가할 시간(초) | |
| 31 | 'mode': 'username' #ip OR username | |
| 23 | 32 | } |
| 24 | 33 | response = requests.post('https://theseed.io/api/v0/aclgroup', headers=headers, data=data) |
| 25 | 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) | |
| 44 | }}} |