public class Session
Class that handles all website access. The internals of this class should be replaced with API calls once the API is implemented
Constructor and Description |
---|
Session(java.lang.String username,
java.lang.String password)
Class that handles all website access. The internals of this class should be
replaced with API calls once the API is implemented
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String url)
Executes a GET request
|
java.util.List<net.namibsun.fussballtipp.lib.objects.Match> |
getMatches()
Retrieves a list of matches on which the user can currently bet on
|
boolean |
isLoggedIn()
Checks if the user is logged in in this session
|
void |
post(java.lang.String url,
java.util.HashMap<java.lang.String,java.lang.String> params)
Executes a POST request
|
public Session(java.lang.String username, java.lang.String password)
Class that handles all website access. The internals of this class should be replaced with API calls once the API is implemented
username
- : The username to usepassword
- : The password to useusername
- : The username to usepassword
- : The password to usepublic boolean isLoggedIn()
Checks if the user is logged in in this session
public java.lang.String get(java.lang.String url)
Executes a GET request
url
- : The URL to which to send the requestpublic void post(java.lang.String url, java.util.HashMap<java.lang.String,java.lang.String> params)
Executes a POST request
url
- : The URL to send the request toparams
- : The parameters to send in the POST requestpublic java.util.List<net.namibsun.fussballtipp.lib.objects.Match> getMatches()
Retrieves a list of matches on which the user can currently bet on