Class GreenhouseApi
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.model.api.Api
-
- com.inhousegreenhouse.ch.backend.model.api.GreenhouseApi
-
public class GreenhouseApi extends Api
GreenhouseApi is a class that handles all requests to the Greenhouse API.
-
-
Constructor Summary
Constructors Constructor Description GreenhouseApi(java.lang.String userToken, java.lang.String proxyURL)
Constructor for GreenhouseApi.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Greenhouse
registerGreenhouse(java.lang.String name, java.lang.String description)
Register a new greenhouse inside the Greenhouse API.-
Methods inherited from class com.inhousegreenhouse.ch.backend.model.api.Api
getBaseUrl, sendRequest
-
-
-
-
Method Detail
-
registerGreenhouse
public Greenhouse registerGreenhouse(java.lang.String name, java.lang.String description) throws ProxyRequestFailException
Register a new greenhouse inside the Greenhouse API.- Parameters:
name
- The name of the greenhouse.description
- The description of the greenhouse.- Returns:
- The greenhouse that was registered as a Greenhouse object.
- Throws:
ProxyRequestFailException
- If the request to the Greenhouse API fails.
-
-