-
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
Showing
36 changed files
with
9,830 additions
and
74 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Ana | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,53 @@ | ||
const axios = require('axios'); | ||
const oauth = require('axios-oauth-client'); | ||
const GraphQLClient = require('graphql-request').GraphQLClient; | ||
require('dotenv').config(); | ||
|
||
const APIKey = process.env.WCL_API_KEY; | ||
const clientID = process.env.WCL_CLIENT; | ||
const clientSecret = process.env.WCL_SECRET; | ||
const oAuthEndpoint = process.env.WCL_OAUTH_ENDPOINT; | ||
const wclEndpoint = process.env.WCL_GQL_ENDPOINT; | ||
|
||
module.exports = async function (code) { | ||
const query = `{ | ||
reportData { | ||
report(code: "${code}") { | ||
fights(translate: true, killType: Kills) { | ||
keystoneAffixes | ||
keystoneLevel | ||
id | ||
startTime | ||
endTime | ||
keystoneTime | ||
gameZone { | ||
id | ||
name | ||
} | ||
encounterID | ||
} | ||
title | ||
} | ||
} | ||
}`; | ||
|
||
const getClientCredentials = oauth.client(axios.create(), { | ||
url: oAuthEndpoint, | ||
grant_type: 'client_credentials', | ||
client_id: clientID, | ||
client_secret: clientSecret, | ||
}); | ||
|
||
const auth = await getClientCredentials(); | ||
|
||
const graphQLClient = new GraphQLClient(wclEndpoint, { | ||
headers: { | ||
authorization: `Bearer ${auth.access_token}`, | ||
}, | ||
}); | ||
|
||
const data = await graphQLClient.request(query); | ||
const dataToExtract = JSON.stringify(data, undefined, 2); | ||
|
||
return dataToExtract; | ||
}; |
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,88 @@ | ||
const axios = require('axios'); | ||
const oauth = require('axios-oauth-client'); | ||
const GraphQLClient = require('graphql-request').GraphQLClient; | ||
require('dotenv').config(); | ||
|
||
const APIKey = process.env.WCL_API_KEY; | ||
const clientID = process.env.WCL_CLIENT; | ||
const clientSecret = process.env.WCL_SECRET; | ||
const oAuthEndpoint = process.env.WCL_OAUTH_ENDPOINT; | ||
const wclEndpoint = process.env.WCL_GQL_ENDPOINT; | ||
|
||
module.exports = async function (code, id, startTime, endTime) { | ||
const query = `{ | ||
reportData { | ||
report(code: "${code}") { | ||
table(dataType: Summary startTime: ${startTime} endTime: ${endTime}) | ||
fights(encounterID: ${id} translate: true, killType: All) { | ||
averageItemLevel | ||
keystoneAffixes | ||
keystoneLevel | ||
id | ||
startTime | ||
endTime | ||
keystoneTime | ||
gameZone { | ||
id | ||
name | ||
} | ||
friendlyPlayers | ||
encounterID | ||
dungeonPulls { | ||
name | ||
encounterID | ||
enemyNPCs{ | ||
id | ||
gameID | ||
} | ||
maps { | ||
id | ||
} | ||
x | ||
y | ||
endTime | ||
startTime | ||
} | ||
boundingBox { | ||
minX | ||
minY | ||
} | ||
} | ||
region { | ||
slug | ||
} | ||
title | ||
startTime | ||
endTime | ||
masterData{ | ||
actors(type: "Player"){ | ||
id | ||
name | ||
subType | ||
server | ||
} | ||
} | ||
} | ||
} | ||
}`; | ||
|
||
const getClientCredentials = oauth.client(axios.create(), { | ||
url: oAuthEndpoint, | ||
grant_type: 'client_credentials', | ||
client_id: clientID, | ||
client_secret: clientSecret, | ||
}); | ||
|
||
const auth = await getClientCredentials(); | ||
|
||
const graphQLClient = new GraphQLClient(wclEndpoint, { | ||
headers: { | ||
authorization: `Bearer ${auth.access_token}`, | ||
}, | ||
}); | ||
|
||
const data = await graphQLClient.request(query); | ||
const dataToExtract = JSON.stringify(data, undefined, 2); | ||
|
||
return dataToExtract; | ||
}; |
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,34 @@ | ||
  <a href="https://www.buymeacoffee.com/ukliz" target="_blank"> <img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="28" width="130"></a> <img alt="Express.js" src="https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB"/> | ||
|
||
# Keystone Helper | ||
|
||
> This web application uses Warcraft logs v2 API to help World of Warcraft players analyze keystone logs. | ||
## Live version 📡 | ||
|
||
Not availiable **yet** | ||
|
||
### Paste your report code or link: | ||
|
||
 | ||
|
||
### Click the key you want to analyze: | ||
|
||
 | ||
|
||
### Analyze it! (still under developement): | ||
|
||
 | ||
|
||
## Contributing 🖇️ | ||
|
||
Any contributions are highly appreciated. There are two things you can do: | ||
|
||
1. Create an issue explaining your idea. | ||
2. Fork the project and submit a Pull Request with your idea already developed explaining it in detail. | ||
|
||
## License 📄 | ||
|
||
This project is [MIT](https://choosealicense.com/licenses/mit/) licenced | ||
|
||
⌨️ with ❤️ by [Ukliz](https://github.com/Uklizdev) 😊 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.