Skip to content

Commit

Permalink
Update the settings of the REST client
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Sep 8, 2024
1 parent 7f4f553 commit f95e5d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"[yaml]": {"editor.insertSpaces": true},
"rest-client.environmentVariables": {
"development": {
"apiKey": "AKISMET_API_KEY",
"apiUrl": "https://rest.akismet.com"
}
}
Expand Down
6 changes: 3 additions & 3 deletions share/check_comment.http
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
POST {{apiUrl}}/1.1/comment-check
Content-Type: application/x-www-form-urlencoded

api_key={{$processEnv %apiKey}}
api_key={{$processEnv AKISMET_API_KEY}}
&blog=https://github.com/cedx/akismet.js
&comment_author=Akismet
&comment_author_url=https://belin.io
&comment_content=I'm testing out the Service API.
&comment_type=comment
&is_test=true
&referrer=https://www.npmjs.com/package/@cedx/akismet
&user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
&user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
&user_ip=192.168.0.1
&user_role=administrator

### Checks the specified spam against the service database.
POST {{apiUrl}}/1.1/comment-check
Content-Type: application/x-www-form-urlencoded

api_key={{$processEnv %apiKey}}
api_key={{$processEnv AKISMET_API_KEY}}
&blog=https://github.com/cedx/akismet.js
&comment_author=viagra-test-123
&comment_content=Spam!
Expand Down
6 changes: 3 additions & 3 deletions share/submit_ham_spam.http
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
POST {{apiUrl}}/1.1/submit-ham
Content-Type: application/x-www-form-urlencoded

api_key={{$processEnv %apiKey}}
api_key={{$processEnv AKISMET_API_KEY}}
&blog=https://github.com/cedx/akismet.js
&comment_author=Akismet
&comment_author_url=https://belin.io
&comment_content=I'm testing out the Service API.
&comment_type=comment
&is_test=true
&referrer=https://www.npmjs.com/package/@cedx/akismet
&user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
&user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
&user_ip=192.168.0.1
&user_role=administrator

### Submits the specified comment that was not marked as spam but should have been.
POST {{apiUrl}}/1.1/submit-spam
Content-Type: application/x-www-form-urlencoded

api_key={{$processEnv %apiKey}}
api_key={{$processEnv AKISMET_API_KEY}}
&blog=https://github.com/cedx/akismet.js
&comment_author=viagra-test-123
&comment_content=Spam!
Expand Down
4 changes: 2 additions & 2 deletions share/verify_key.http
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
POST {{apiUrl}}/1.1/verify-key
Content-Type: application/x-www-form-urlencoded

blog=https://github.com/cedx/akismet.js
&key={{$processEnv %apiKey}}
api_key={{$processEnv AKISMET_API_KEY}}
&blog=https://github.com/cedx/akismet.js

0 comments on commit f95e5d0

Please sign in to comment.