This repository has been archived by the owner on Aug 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
supergrecko
committed
Jun 26, 2019
1 parent
eb8d0ca
commit 8453661
Showing
4 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,22 @@ | ||
{ | ||
"name": "lolswap", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/supergrecko/lolswap.git" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/supergrecko/lolswap/issues" | ||
}, | ||
"homepage": "https://github.com/supergrecko/lolswap#readme", | ||
"dependencies": { | ||
"league-connect": "^1.0.3" | ||
} | ||
} |
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,21 @@ | ||
import Connector from 'league-connect'; | ||
|
||
let id: string = process.argv[2]; | ||
|
||
const icon: number = parseFloat(id); | ||
|
||
Connector.connect().then((res) => { | ||
Connector.sendRequest({ | ||
url: 'lol-summoner/v1/current-summoner/icon', | ||
method: 'PUT', | ||
body: { | ||
profileIconId: icon | ||
} | ||
}).then((res) => { | ||
console.log('Summoner Icon has been changed.'); | ||
}).catch(() => { | ||
console.log('Invalid Summoner Icon ID. If this problem persists, restart your League Client and retry.') | ||
}) | ||
}).catch((err) => { | ||
console.error(err); | ||
}); |
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"outDir": "./dist" | ||
} | ||
} |