Add api.photos.search.

This commit is contained in:
voussoir 2021-06-01 17:51:31 -07:00
parent f30528cc35
commit 049fc794c3
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -308,6 +308,18 @@ function remove_tag(photo_id, tagname, callback)
return common.post(url, data, callback); return common.post(url, data, callback);
} }
api.photos.search =
function search(parameters, callback)
{
parameters = parameters.toString();
let url = "/search.json";
if (parameters !== "" )
{
url += "?" + parameters;
}
return common.get(url, callback)
}
api.photos.set_searchhidden = api.photos.set_searchhidden =
function set_searchhidden(photo_id, callback) function set_searchhidden(photo_id, callback)
{ {