@GET
@Path("{token}/update/{pin}")
@Consumes(value = MediaType.APPLICATION_JSON)
@Metric(HTTP_UPDATE_PIN_DATA)
public Response updateWidgetPinDataViaGet(@PathParam("token") String token,
@PathParam("pin") String pinString,
@QueryParam("value") String[] pinValues,
@EnumQueryParam(WidgetProperty.class)
AbstractMap.SimpleImmutableEntry<WidgetProperty, String>
widgetProperty) {
if (pinValues != null) {
return updateWidgetPinData(token, pinString, pinValues);
}
if (widgetProperty != null) {
return updateWidgetProperty(token, pinString, widgetProperty.getKey(), widgetProperty.getValue());
}
return badRequest("Wrong request format.");
}