added simkl gettoken to bruno

This commit is contained in:
John O'Keefe 2024-07-30 12:57:08 -04:00
parent 784e6c0b7d
commit 0ed827fc9a
5 changed files with 69 additions and 0 deletions

1
SimklFunctions.go Normal file
View File

@ -0,0 +1 @@
package main

1
SimklUserFunctions.go Normal file
View File

@ -0,0 +1 @@
package main

View File

@ -0,0 +1,29 @@
meta {
name: Get Code
type: http
seq: 1
}
get {
url: https://simkl.com/oauth/authorize?response_type=code&client_id={{SIMKL_CLIENT_ID}}&redirect_uri=http://localhost:6734/callback
body: none
auth: oauth2
}
params:query {
response_type: code
client_id: {{SIMKL_CLIENT_ID}}
redirect_uri: http://localhost:6734/callback
}
auth:oauth2 {
grant_type: authorization_code
callback_url: http://localhost:6734/callback
authorization_url: https://api.simkl.com/oauth/authorize
access_token_url: https://api.simkl.com/oauth/token
client_id: {{SIMKL_CLIENT_ID}}
client_secret: {{SIMKL_CLIENT_SECRET}}
scope:
state:
pkce: false
}

View File

@ -0,0 +1,37 @@
meta {
name: SimklGetAuthorizationToken
type: http
seq: 2
}
post {
url: https://api.simkl.com/oauth/token
body: json
auth: none
}
headers {
Content-Type: application/json
}
body:json {
{
"grant_type": "authorization_code",
"client_id": "{{SIMKL_CLIENT_ID}}",
"client_secret": "{{SIMKL_CLIENT_SECRET}}",
"redirect_uri": "http://localhost:6734/callback",
"code": "c2b956d5086c5515ff518bfb2857d7f55453f5f8a8e245f6a37c2e3838fe1a7a"
}
}
body:form-urlencoded {
grant_type: authorization_code
client_id: {{SIMKL_CLIENT_ID}}
client_secret: {{SIMKL_CLIENT_SECRET}}
redirect_uri: http://localhost:6734/callback
code: c2b956d5086c5515ff518bfb2857d7f55453f5f8a8e245f6a37c2e3838fe1a7a
}
body:multipart-form {
:
}

View File

@ -2,6 +2,7 @@ vars {
ANILIST_APP_ID: {{process.env.ANILIST_APP_ID}}
ANILIST_SECRET_TOKEN: {{process.env.ANILIST_SECRET_TOKEN}}
SIMKL_CLIENT_ID: {{process.env.SIMKL_CLIENT_ID}}
SIMKL_CLIENT_SECRET: {{process.env.SIMKL_CLIENT_SECRET}}
}
vars:secret [
code