public class EmpyrClient extends Object
| Constructor and Description |
|---|
EmpyrClient(String clientId) |
EmpyrClient(String clientId,
String clientSecret) |
public EmpyrClient(String clientId)
public void addListener(ClientListener cl)
public void removeListener(ClientListener cl)
public String getClientId()
public String getClientSecret()
public String getUserToken()
public String getAccessToken()
public void setAccessToken(String accessToken)
accessToken - the accessToken to setpublic void setAutoRetryTimes(int autoRetryTimes)
autoRetryTimes - the autoRetryTimes to setpublic void setHost(String host)
host - Sets the host that we will attempt to connect to.public static EmpyrClient getInstance()
public static EmpyrClient getInstance(String clientId)
clientId - The client id of the application.public static EmpyrClient getInstance(String clientId, String clientSecret)
clientId - The client id of the application.clientSecret - The client secret of the application.public void identify(String userToken)
userToken - The userToken for the user.public RestResponse<RestUser> usersSignup(String firstname, String lastname, String email, String postalCode, String password, String referralCode, Map<String,Object> additionalParams)
firstname - The first name of the userlastname - The last name of the useremail - The email address or usertoken for the user. Needs to be in email form.postalCode - The postal code of the user.password - The password for the user.referralCode - The referralcode the user signed up with.additionalParams - Any additional params to pass to the API.public RestResponse<RestUser> usersGet(String userId)
userId - public RestResponse<RestUser> uploadPhoto(FileUpload fu)
public RestResponse<RestUser> usersLookup(String email)
email - The user to lookup by email or usertoken.public RestResponse<RestResults<RestTransaction>> usersGetTransactions(Integer userId, String userToken)
userId - userToken - public RestResponse<Map<String,String>> getTopCategories()
public RestResponse<Map<String,String>> getFeatures()
public RestResponse<RestCard> cardsAdd(String cardNumber, int expirationMonth, int expirationYear, String userToken)
public RestResponse<RestCard> cardsAdd(String cardNumber, int expirationMonth, int expirationYear, String userToken, Map<String,Object> additionalParams)
public RestResponse<Boolean> cardsExists(String cardNumber)
cardNumber - public RestResponse<RestResults<RestCard>> cardsList(String usertoken)
public RestResponse<Boolean> cardsRemove(String cardNumber, String email)
public RestResponse<Map<String,String>> getCategories()
public RestResponse<RestApplication> getApplicationInfo()
public RestResponse<RestBusiness> venuesSave(String businessToken, String name, String phone, Integer ownerId, String streetName, String postalCode, String category, String description, String merchantId, String amexId, String parent, Double discount, Double referralPercent)
public RestResponse<RestBusiness> venuesSave(String businessToken, String name, Integer ownerId, String streetName, String postalCode, String category, String description)
public RestResponse<RestBusiness> venuesAddPhoto(String venueId, String type, FileUpload fu)
public RestResponse<RestBusiness> venuesRemovePhoto(String venueId, Integer mediaId)
protected <T> RestResponse<T> executeRequest(Request<T> r)
protected <T> RestResponse<T> executeRequest(Request<T> r, int numRetries)
public OAuthResponse getAccessToken(String grantType, Map<String,Object> params)
Copyright © 2018 Empyr, Inc.. All rights reserved.