Skip to content

Instantly share code, notes, and snippets.

@taycaldwell
Created December 15, 2014 10:15
Show Gist options
  • Save taycaldwell/d5ea6a74a6493829b5a2 to your computer and use it in GitHub Desktop.
Save taycaldwell/d5ea6a74a6493829b5a2 to your computer and use it in GitHub Desktop.
Using riot-api-java within Android app.
import android.app.Application;
import main.java.riotapi.RiotApi;
public class GlobalClass extends Application {
private RiotApi api;
public GlobalClass() {
this.api = new RiotApi("API-KEY");
}
public RiotApi getApi() {
return api;
}
}
@taycaldwell
Copy link
Author

"Note that embedding a key in a distributed client application, like a desktop or mobile application, means that your key can be compromised. Even secure storage or encrypted keys on a client can be breached. The only way to ensure your API key remains safe is to have the client application access your own server, which then makes the appropriate request to the API using HTTPS." For more information go here: https://developer.riotgames.com/discussion/riot-games-api/show/oomYkEK4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment