-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bb273e
commit 2d9cd3a
Showing
5 changed files
with
103 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
{ | ||
"name": "react-use-lanyard", | ||
"version": "0.2.0", | ||
"main": "dist", | ||
"typings": "dist", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/barbarbar338/react-use-lanyard" | ||
}, | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Barış DEMİRCİ", | ||
"url": "https://338.rocks/" | ||
}, | ||
"license": "GPL-3.0", | ||
"description": "🚀 Use Lanyard API easily in you React app!", | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"build": "tsc", | ||
"format": "prettier --write .", | ||
"lint": "eslint --fix .", | ||
"update": "taze latest -w" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.11", | ||
"@types/react": "^18.0.26", | ||
"@types/react-dom": "^18.0.9", | ||
"@typescript-eslint/eslint-plugin": "^5.45.1", | ||
"@typescript-eslint/parser": "^5.45.1", | ||
"eslint": "^8.29.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"prettier": "^2.8.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"taze": "^0.8.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.3" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16" | ||
}, | ||
"dependencies": { | ||
"swr": "^1.3.0", | ||
"tslib": "^2.4.1" | ||
} | ||
} | ||
|
||
{ | ||
"name": "react-use-lanyard", | ||
"version": "0.3.0", | ||
"main": "dist", | ||
"typings": "dist", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/barbarbar338/react-use-lanyard" | ||
}, | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Barış DEMİRCİ", | ||
"url": "https://338.rocks/" | ||
}, | ||
"license": "GPL-3.0", | ||
"description": "🚀 Use Lanyard API easily in you React app!", | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"build": "tsc", | ||
"format": "prettier --write .", | ||
"lint": "eslint --fix .", | ||
"update": "taze latest -w" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.14.2", | ||
"@types/react": "^18.0.28", | ||
"@types/react-dom": "^18.0.11", | ||
"@typescript-eslint/eslint-plugin": "^5.54.0", | ||
"@typescript-eslint/parser": "^5.54.0", | ||
"eslint": "^8.35.0", | ||
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"prettier": "^2.8.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"taze": "^0.8.5", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.5" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16" | ||
}, | ||
"dependencies": { | ||
"swr": "^2.0.4", | ||
"tslib": "^2.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./constants"; | ||
export * from "./kv"; | ||
export * from "./lanyard"; | ||
export * from "./types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { API_URL } from "./constants"; | ||
import { IDelete, ISet } from "./types"; | ||
|
||
export const set = async ({ apiKey, key, userId, value, apiUrl }: ISet) => | ||
fetch(`https://${apiUrl || API_URL}/v1/users/${userId}/kv/${key}`, { | ||
method: "PUT", | ||
headers: { | ||
Authorization: apiKey, | ||
}, | ||
body: value, | ||
}); | ||
|
||
export const del = async ({ apiKey, key, userId, apiUrl }: IDelete) => | ||
fetch(`https://${apiUrl || API_URL}/v1/users/${userId}/kv/${key}`, { | ||
method: "DELETE", | ||
headers: { | ||
Authorization: apiKey, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters