-
Notifications
You must be signed in to change notification settings - Fork 2
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
12 changed files
with
211 additions
and
97 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,6 +1,3 @@ | ||
api.key= | ||
summoner.name= | ||
summoner.id= | ||
region= | ||
rate.per10minutes= | ||
rate.per10seconds= |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import lol4j.client.Lol4JClient; | ||
import lol4j.client.impl.Lol4JClientImpl; | ||
|
||
import java.io.File; | ||
import java.io.FileReader; | ||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
/** | ||
* Created by Aaryn101 on 12/14/13. | ||
*/ | ||
public class Lol4JTestClient { | ||
private static Lol4JTestClient instance; | ||
|
||
private String apiKey = null; | ||
private int numPerTenSeconds; | ||
private int numPerTenMinutes; | ||
private Lol4JClientImpl client = null; | ||
|
||
private Lol4JTestClient() { | ||
Properties p = new Properties(); | ||
try { | ||
p.load(new FileReader(new File("junit.properties"))); | ||
apiKey = p.getProperty("api.key"); | ||
numPerTenMinutes = Integer.parseInt(p.getProperty("rate.per10minutes")); | ||
numPerTenSeconds = Integer.parseInt(p.getProperty("rate.per10seconds")); | ||
client = new Lol4JClientImpl(apiKey); | ||
client.setRateLimit(numPerTenSeconds, numPerTenMinutes); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public static Lol4JTestClient getInstance() { | ||
if (instance == null) { | ||
instance = new Lol4JTestClient(); | ||
} | ||
return instance; | ||
} | ||
|
||
public static Lol4JClient getClient() { | ||
return getInstance().client; | ||
} | ||
|
||
public static int getNumPerTenSeconds() { | ||
return getInstance().numPerTenSeconds; | ||
} | ||
|
||
public static int getNumPerTenMinutes() { | ||
return getInstance().numPerTenMinutes; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.