Class FieldsParameter
- java.lang.Object
-
- com.aerisweather.aeris.communication.parameter.Parameter
-
- com.aerisweather.aeris.communication.parameter.FieldsParameter
-
public class FieldsParameter extends Parameter
By default the API will return the complete dataset for each endpoint request as defined in the respective endpoint documentation. However, oftentimes only a portion of the complete dataset is required by an application which is where the fields parameter is useful. The fields parameter allows you to control the output by passing a comma-separated list of the required properties you want returned for each object within the dataset.
For example, your application only needs the observed temperature in degrees Fahrenheit, the primary weather type and weather icon. Using dot-notation to indicate these properties.
-
-
Constructor Summary
Constructors Constructor Description FieldsParameter()
Basic constructor for the fields parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FieldsParameter
initWith(CodedInterface... fields)
Static instantiation for a fields parameterstatic FieldsParameter
initWith(String... fields)
Static instantiation for a fields parameterFieldsParameter
withFields(CodedInterface... fields)
Deprecated.FieldsParameter
withFields(String... fields)
Add fields to the parameter-
Methods inherited from class com.aerisweather.aeris.communication.parameter.Parameter
build, buildEscaped
-
-
-
-
Constructor Detail
-
FieldsParameter
public FieldsParameter()
Basic constructor for the fields parameter. UsewithFields(String...)
to add fields
-
-
Method Detail
-
initWith
public static FieldsParameter initWith(CodedInterface... fields)
Static instantiation for a fields parameter- Parameters:
fields
- fields to create the parameter with.- Returns:
- constructed fields parameter.
-
initWith
public static FieldsParameter initWith(String... fields)
Static instantiation for a fields parameter- Parameters:
fields
- fields to create the parameter with.- Returns:
- constructed fields parameter.
-
withFields
@Deprecated public FieldsParameter withFields(CodedInterface... fields)
Deprecated.Add fields to the parameter- Parameters:
fields
- array of Coded fields to use.- Returns:
- field parameter with the fields
-
withFields
public FieldsParameter withFields(String... fields)
Add fields to the parameter- Parameters:
fields
- array of String fields to use.- Returns:
- field parameter with the fields
-
-