@r/api-client
Advanced tools
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
+1
-1
| { | ||
| "name": "@r/api-client", | ||
| "version": "3.34.0", | ||
| "version": "3.35.0", | ||
| "description": "A wrapper for Reddit's API", | ||
@@ -5,0 +5,0 @@ "main": "build.js", |
@@ -57,2 +57,38 @@ import apiRequest from '../apiBase/apiRequest'; | ||
| const markNSFW = (apiOptions, id) => { | ||
| // Mark a link as NSFW | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/marknsfw', { body, type: 'form' }); | ||
| } | ||
| const unmarkNSFW = (apiOptions, id) => { | ||
| // Unmark a link as NSFW | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/unmarknsfw', { body, type: 'form' }); | ||
| } | ||
| const lock = (apiOptions, id) => { | ||
| // Lock a link | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/lock', { body, type: 'form' }); | ||
| } | ||
| const unlock = (apiOptions, id) => { | ||
| // Unlock a link | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/unlock', { body, type: 'form' }); | ||
| } | ||
| const spoiler = (apiOptions, id) => { | ||
| // Spoiler a post | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/spoiler', { body, type: 'form' }); | ||
| } | ||
| const unspoiler = (apiOptions, id) => { | ||
| // Unspoiler a post | ||
| const body = { id }; | ||
| return apiRequest(apiOptions, 'POST', 'api/unspoiler', { body, type: 'form' }); | ||
| } | ||
| /** | ||
@@ -101,2 +137,8 @@ * Set or unset a stickied post (AKA an "Annoucement"). | ||
| distinguish, | ||
| markNSFW, | ||
| unmarkNSFW, | ||
| lock, | ||
| unlock, | ||
| spoiler, | ||
| unspoiler, | ||
| setStickyComment, | ||
@@ -103,0 +145,0 @@ setSubredditSticky, |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
256524
3.6%98
3.16%4168
0.87%32
-3.03%