com.recombee.api_client.api_requests.UpdateMoreItems Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-client Show documentation
Show all versions of api-client Show documentation
A client library for easy use of the Recombee recommendation API
The newest version!
package com.recombee.api_client.api_requests;
/*
This file is auto-generated, do not edit
*/
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import com.recombee.api_client.bindings.Logic;
import com.recombee.api_client.util.HTTPMethod;
/**
* Updates (some) property values of all the items that pass the filter.
* Example: *Setting all the items that are older than a week as unavailable*
* ```
* {
* "filter": "'releaseDate' < now() - 7*24*3600",
* "changes": {"available": false}
* }
* ```
*/
public class UpdateMoreItems extends Request {
/**
* A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated.
*/
protected String filter;
/**
* A dictionary where the keys are properties that shall be updated.
*/
protected Map changes;
/**
* Construct the request
* @param filter A [ReQL](https://docs.recombee.com/reql.html) expression, which returns `true` for the items that shall be updated.
* @param changes A dictionary where the keys are properties that shall be updated.
*/
public UpdateMoreItems (String filter,Map changes) {
this.filter = filter;
this.changes = changes;
this.timeout = 100000;
}
public String getFilter() {
return this.filter;
}
public Map getChanges() {
return this.changes;
}
/**
* @return Used HTTP method
*/
@Override
public HTTPMethod getHTTPMethod() {
return HTTPMethod.POST;
}
/**
* @return URI to the endpoint including path parameters
*/
@Override
public String getPath() {
return "/more-items/";
}
/**
* Get query parameters
* @return Values of query parameters (name of parameter: value of the parameter)
*/
@Override
public Map getQueryParameters() {
HashMap params = new HashMap();
return params;
}
/**
* Get body parameters
* @return Values of body parameters (name of parameter: value of the parameter)
*/
@Override
public Map getBodyParameters() {
HashMap params = new HashMap();
params.put("filter", this.filter);
params.put("changes", this.changes);
return params;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy