slack app boilerplate
1.0.0
각 명령은 MVC 컨트롤러로 리디렉션됩니다.
예를 들어,
/[command] list
/api/list 로 리디렉션됩니다
/[command] list something
/api/list/something 으로 리디렉션됩니다
/[command] list something extra things
/api/list/something?extraParameters=extra+things 로 리디렉션됩니다
쉬운 족제비.
[SlackAuthentication] 사용 :
모든 요청이 검증되어 있으므로 실제로 슬랙에서 나온다는 것을 알고 있습니다.
사용 :
[SlackAuthorizeByUser(authorizedUsernames: new[] {"luciansr"})]
"Luciansr"만 경로를 실행할 수 있는지 확인할 수 있습니다.
[SlackAuthorizeByUser(authorizedChannels: new[] {"general"})]
채널 "일반"의 요청 만 경로를 실행할 수 있는지 확인할 수 있습니다.
curl -X POST
http://localhost:5001/api/slack2
-H 'Content-Type: application/x-www-form-urlencoded'
-H 'cache-control: no-cache'
-H 'x-slack-request-timestamp: 1561931414'
-H 'x-slack-signature: v0=283155a3328d9cfd2a3308c566ca68fe4bd59088f14a8c1497662b52d633ecaf'
-d 'token=8O4s3rgvVFjHTv3aAVtbo2FP&team_id=TKVHCH21L&team_domain=luciandev&channel_id=CKSUPQ31A&channel_name=general&user_id=UKG1CTVU3&user_name=luciansr&command=%2Flucian&text=list&response_url=https%3A%2F%2Fhooks.slack.com%2Fcommands%2FTKVHCH21L%2F682573638535%2FnJeeLss5of7MRLAkdPn9sm3C&trigger_id=669321780995.675590580054.5a199315fdefcc23c84eb3042b4100d1'
코딩을 시작하기 위해해야 할 모든 것.