Package com.aerisweather.aeris.model
Class AerisPermissionsResponse
- java.lang.Object
-
- com.aerisweather.aeris.model.AerisPermissionsResponse
-
public class AerisPermissionsResponse extends Object
Model representing the Aeris permissions. This class holds data referencing which API calls a client has access too. This is obtained through making anPermissionsTask
-
-
Field Summary
Fields Modifier and Type Field Description AerisError
error
AerisError
returned from the response.The error property will always be null if the request was successful, results were returned and there were no errors or warnings.AerisPermissions
permissions
boolean
success
Success status of the request.
-
Constructor Summary
Constructors Constructor Description AerisPermissionsResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AerisPermissionsResponse
fromJSON(org.json.JSONObject json)
Construction from a JSON object.AerisError
getError()
Gets the error from the response, if there is one.AerisPermissions
getPermissions()
Get the permissions from the response.boolean
isSuccessful()
Gets the success of the response.
-
-
-
Field Detail
-
success
public boolean success
Success status of the request.
-
error
public AerisError error
AerisError
returned from the response.The error property will always be null if the request was successful, results were returned and there were no errors or warnings.
-
permissions
public AerisPermissions permissions
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
Gets the success of the response. Returns true if the response was sucessful or had a warning.- Returns:
- true if the response was successful.
-
getError
public AerisError getError()
Gets the error from the response, if there is one.- Returns:
- the error
-
fromJSON
public static AerisPermissionsResponse fromJSON(org.json.JSONObject json)
Construction from a JSON object. This constructor is needed to properly pull the JSON as the JSON response field can be an array or just a single object, so this helps fix that.- Parameters:
json
- Json object to use to construct the AerisResponse- Returns:
- data
-
getPermissions
public AerisPermissions getPermissions()
Get the permissions from the response.- Returns:
- the permissions
-
-