Java Client

Source code: https://github.com/tryterra/terra-client-java

class TerraClientV2

An object that manages getting data, verifying signatures and authenticating users

Initialisation

TerraClientV2 client = TerraClientFactory.getClientV2(String xApiKey, String devId);

Methods

Method NameReturnsExplanation
getActivityForUser​Future<TerraApiResponse>returns an api response that when parsed contains activity data
getAthleteForUserFuture<TerraApiResponse>returns an api response that when parsed contains athlete data
getBodyForUser​Future<TerraApiResponse>returns an api response that when parsed contains body data
getDailyForUser​Future<TerraApiResponse>returns an api response that when parsed contains daily data
getMenstruationForUser​Future<TerraApiResponse>returns an api response that when parsed contains menstruation data
getNutritionForUser​Future<TerraApiResponse>returns an api response that when parsed contains nutrition data
getSleepForUser​Future<TerraApiResponse>returns an api response that when parsed contains sleep data
getUserFuture<? extends TerraApiResponse<? extends User>>returns an api response that when parsed contains user data
userFromId​PartialUserreturns a User object from user_id
getAllUsersFuture<? extends TerraApiResponse<? extends User>>returns an api response that when parsed contains a list of all users