Class UserService
java.lang.Object
com.github.badpop.jcoinbase.service.user.UserService
public class UserService
extends java.lang.Object
This service allows you to request coinbase users and current user data. To properly use
this service, you must provide an API Key and an API secret when building a JCoinbaseClient
instance.
-
Constructor Summary
Constructors Constructor Description UserService()
-
Method Summary
Modifier and Type Method Description CallResult<io.vavr.collection.Seq<CoinbaseError>,Authorizations>
getAuthorizations()
Get current user’s authorization information including granted scopesCallResult<java.util.List<CoinbaseError>,Authorizations>
getAuthorizationsAsJava()
Get current user’s authorization information including granted scopesCallResult<io.vavr.collection.Seq<CoinbaseError>,User>
getCurrentUser()
Get the current user data based on the provided coinbase API Key.CallResult<java.util.List<CoinbaseError>,User>
getCurrentUserAsJava()
Get the current user data based on the provided coinbase API Key.CallResult<io.vavr.collection.Seq<CoinbaseError>,User>
getUserById(java.lang.String userId)
Get any user’s public information with their ID.CallResult<java.util.List<CoinbaseError>,User>
getUserByIdAsJava(java.lang.String userId)
Get any user’s public information with their ID.CallResult<io.vavr.collection.Seq<CoinbaseError>,User>
updateCurrentUser(UpdateCurrentUserRequest request)
Modify current user and their preferences.CallResult<java.util.List<CoinbaseError>,User>
updateCurrentUserAsJava(UpdateCurrentUserRequest request)
Modify current user and their preferences.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
UserService
public UserService()
-
-
Method Details
-
getCurrentUserAsJava
Get the current user data based on the provided coinbase API Key.- Returns:
- a
CallResult
containing aUser
object if it's ok, a List ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
getCurrentUser
Get the current user data based on the provided coinbase API Key.- Returns:
- a
CallResult
containing aUser
object if it's ok, a Seq ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
getAuthorizationsAsJava
Get current user’s authorization information including granted scopes- Returns:
- a
CallResult
containing anAuthorizations
object if it's ok, a List ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
getAuthorizations
Get current user’s authorization information including granted scopes- Returns:
- a
CallResult
containing anAuthorizations
object if it's ok, a Seq ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
getUserByIdAsJava
Get any user’s public information with their ID.- Returns:
- a
CallResult
containing anUser
object if it's ok, a List ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
getUserById
public CallResult<io.vavr.collection.Seq<CoinbaseError>,User> getUserById(java.lang.String userId)Get any user’s public information with their ID.- Returns:
- a
CallResult
containing anUser
object if it's ok, a Seq ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
updateCurrentUserAsJava
public CallResult<java.util.List<CoinbaseError>,User> updateCurrentUserAsJava(UpdateCurrentUserRequest request)Modify current user and their preferences.- Returns:
- a
CallResult
containing anUser
object if it's ok, a List ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-
updateCurrentUser
public CallResult<io.vavr.collection.Seq<CoinbaseError>,User> updateCurrentUser(UpdateCurrentUserRequest request)Modify current user and their preferences.- Returns:
- a
CallResult
containing anUser
object if it's ok, a Seq ofCoinbaseError
otherwise. - Throws:
JCoinbaseException
- on unknown errors
-