Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AnadeOre committed Nov 24, 2021
2 parents e712e3d + 8bfe847 commit ad3a2e4
Show file tree
Hide file tree
Showing 36 changed files with 9,830 additions and 74 deletions.
Binary file added Images/Choose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions LICENSE
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.
53 changes: 53 additions & 0 deletions Queries/infoQueryRequest.js
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;
};
88 changes: 88 additions & 0 deletions Queries/summaryQueryRequest.js
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;
};
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
![GitHub](https://img.shields.io/github/license/Uklizdev/keystone-helper?style=for-the-badge) ![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) <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:

![Main](/Images/Main.png)

### Click the key you want to analyze:

![Chooose](/Images/Choose.png)

### Analyze it! (still under developement):

![Summary](/Images/Summary.png)

## 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) 😊
70 changes: 0 additions & 70 deletions frontend/README.md

This file was deleted.

Loading

0 comments on commit ad3a2e4

Please sign in to comment.