Class Api
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.model.api.Api
-
- Direct Known Subclasses:
GreenhouseApi,SensorApi
public class Api extends java.lang.ObjectThis class is used to send requests to the GraphQL API.
-
-
Constructor Summary
Constructors Constructor Description Api(java.lang.String proxyUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBaseUrl()The URL of the API.ApiResponsesendRequest(ApiRequest apiRequest)Send a GraphQL query to the API.
-
-
-
Method Detail
-
sendRequest
public ApiResponse sendRequest(ApiRequest apiRequest)
Send a GraphQL query to the API.- Parameters:
apiRequest- The GraphQL query to send.- Returns:
- The response of the query.
-
getBaseUrl
public java.lang.String getBaseUrl()
The URL of the API.- Returns:
- The URL of the API.
-
-