Package ch.aaap.harvestclient.core
Class Harvest
Object
ch.aaap.harvestclient.core.Harvest
Main client class. All API access starts from this.
 
Note for developers: Harvest datatype mappings: boolean -> Boolean string -> String integer-> Long decimal -> Double date -> LocalDate datetime -> Instant time -> LocalTime, but depends on harvest config for parsing array -> List<T> object -> Object
- 
Constructor Details
- 
Harvest
public Harvest() - 
Harvest
public Harvest(com.typesafe.config.Config config) Check reference.conf under src/main/resources for the default configuration. You can either create a application.conf file that you put in your own src/main/resources that will override the settings, or build a Config object from scratch withConfigFactoryExample:
// use application.conf under src/main/resources Harvest harvest = new Harvest(); // start from defaults Config config = ConfigFactory.defaultReference(); config = config.withValue("harvest.auth.token", ConfigValueFactory.fromAnyRef("YOUR_TOKEN")); config = config.withValue("harvest.auth.accountId", ConfigValueFactory.fromAnyRef("YOUR_ACCOUNT_ID")); harvest = new Harvest(config)- Parameters:
 config- the configuration to be used for this client.- Throws:
 HarvestHttpException- if we fail to get the Company object (to configure the clock format)- See Also:
 
 
 - 
 - 
Method Details
- 
getSelfTimezone
- Returns:
 - the ZoneId of the currently authenticated User
 
 - 
timesheets
 - 
users
 - 
userAssignments
 - 
company
 - 
roles
 - 
projectAssignments
 - 
projects
 - 
taskAssignments
 - 
tasks
 - 
clients
 - 
clientContacts
 - 
estimates
 - 
estimateItemCategories
 - 
estimateMessages
 - 
invoiceItemCategories
 - 
invoices
 - 
invoiceMessages
 - 
invoicePayments
 - 
expenseCategories
 - 
expenses
 - 
getBaseUrl
 - 
getAuthToken
 - 
getAccountId
 - 
getUserAgent
 - 
getTimezoneConfiguration
 - 
getCurrencyConfiguration
 
 -