Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Fixed a thing that can cause errors #32

Merged
merged 3 commits into from
Jan 23, 2017
Merged

Fixed a thing that can cause errors #32

merged 3 commits into from
Jan 23, 2017

Conversation

NotANullPointer
Copy link
Contributor

If you try a thing like
api.getStats(Stats.hdd);
api.getStats(Stats.cpu);
api.getStats(Stats.elo);
api.getStats(Stats.rank);
api.getStats(Stats.av);
api.getStats(Stats.adw);

It will return an error.

With this fix, the api will load the json once, then get all stats based on the loaded JSON.
I added a "refresh" method too, so the dev can refresh stats and get new one.

If you try a thing like
api.getStats(Stats.hdd);
api.getStats(Stats.cpu);
api.getStats(Stats.elo);
api.getStats(Stats.rank);
api.getStats(Stats.av);
api.getStats(Stats.adw);

It will return an error.

With this fix, the api will load the json once, then get all stats based on the loaded JSON.
I added a "refresh" method too, so the dev can refresh stats and get new one.
@itsfolf
Copy link
Member

itsfolf commented Jan 23, 2017

Hi @c0mm4nd, your fork is 1 commit behind the main one, wich is causing conflict, can you please update your fork?

@NotANullPointer
Copy link
Contributor Author

thx for the updates

@itsfolf itsfolf merged commit 5b02d78 into OlympicCode:master Jan 23, 2017
@itsfolf
Copy link
Member

itsfolf commented Jan 23, 2017

I had to revert it since there was compilation errors:


[ERROR] symbol:   variable json

[ERROR] location: class me.checkium.vhackapi.vHackAPI

[ERROR] /home/travis/build/OlympicCode/vHackAPI-Java/src/main/java/me/checkium/vhackapi/vHackAPI.java:[45,28] cannot find symbol

[ERROR] symbol:   variable json

@NotANullPointer
Copy link
Contributor Author

Wait lemme fix

@NotANullPointer
Copy link
Contributor Author

Ok, fixed. I forgot to change "return json...." to "return stats...."

@itsfolf
Copy link
Member

itsfolf commented Jan 23, 2017

How didn't your IDE warn you?

@NotANullPointer
Copy link
Contributor Author

I wasn't on a IDE, I just changed 6 lines

@itsfolf
Copy link
Member

itsfolf commented Jan 23, 2017

You actually need to create a new pull request btw

@NotANullPointer
Copy link
Contributor Author

k

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants