본문으로 건너뛰기
더시드위키
최근 변경
최근 토론
도구 모음
사용자
Cernium/ACLGroup/api
(r17판 RAW)
보기
RAW
역사
[include(사용자:Cernium/tool, tool=pd, 문서=사용자:Cernium/ACLGroup)] ---- [목차] {{{GET /api/v0/aclgroup}}} {{{PUT /api/v0/aclgroup}}} {{{DELETE /api/v0/aclgroup}}} {{{https://theseed.io/internal/admin/thread/(토론 slug)/(댓글 번호)/hide}}} == 기본 == {{{#!syntax python import requests headers = { 'Authorization': 'Bearer API_TOKEN_HERE' } }}} == 목록 == {{{#!syntax python data = { 'group': '인증된 사용자' } response = requests.get('https://theseed.io/api/v0/aclgroup?from=12029', headers=headers, data=data) #?from=12029는 제거해도 됨 print(response.text) }}} ===# 목록/출력 #=== {{{#!syntax python { "groups": [ "차단된 사용자", "인증된 사용자", "관리자", "로그인 허용 차단", "Rainbow", "경고-테스트", "Pink", "test", "Color #1", "Color #2", "Gradient #1", "Gradient #2" ], "group": "인증된 사용자", "aclgroup": [ { "id": 12029, "ip": null, "username": "Cernium", "note": "https://namu.wiki/contribution/fcea127e-0cc6-4080-ae53-93f3aac0d69f/document", "created": 1741256491, "expired": null } ] } ... (생략) }}} == 추가 == {{{#!syntax python data = { 'group': '로그인 허용 차단', #ACLGroup 이름 #'ip': '127.0.0.1', #mode가 ip인 경우 사용 'username': 'Cernium', #사용자 이름 'note': 'api test', #사유 'expire': '20', #추가할 시간(초); 0이면 무기한 'mode': 'username' #ip OR username } response = requests.post('https://theseed.io/api/v0/aclgroup', headers=headers, data=data) }}} == 제거 == {{{#!syntax python data = { 'group': '경고-테스트', #ACLGroup 이름 'id': '14559', #차단 id 'note': 'api test' #사유 } response = requests.delete('https://theseed.io/api/v0/aclgroup', headers=headers, data=data) }}}