node-flickrapi
node-flickrapi copied to clipboard
No results when using min/max_taken_date
I get results here only if the min_taken_date
and max_taken_date
are commented out
var Flickr = require("flickrapi"),
flickrOptions = {
api_key: "xxxxxxxxxxxxxxxxxxxxx",
secret: "xxxxxxxxxxxxxxxxxxxxx"
};
Flickr.authenticate(flickrOptions, function(error, flickr) {
if(error){return console.error(error);}
flickr.photos.search({
user_id: "xxxxxxxxxxxxxxxxxxxxx",
min_taken_date: "2011-01-16+00:00:00",
max_taken_date: "2011-01-17+00:00:00"
}, function(err, result) {
if(err){throw new Error(err);}
console.log(result.photos);
});
});
hm. marking as bug, will try to have a look at this soon. thanks for reporting it!
do you have ETA for resolution or can you suggest a package that's as good that I could use in the meantime? thanks.
I do not, but I am taking a two week break from my day job so this is a thing I'll actually have time to look at. As for alternatives: the only reason I wrote this package was because there were none. Maybe that has changed since, but I don't know of any.
If you want to do some bug hunting to help expedite the process, though, it might be worth putting a few console logs in https://github.com/Pomax/node-flickrapi/blob/master/src/utils.js#L259-L326 and seeing what's getting sent to Flickr, and what kind of error(s) it reports as a consequence.
cool, will do that this week. thanks
follow-up thought: the API claims "The date can be in the form of a mysql datetime or unix timestamp", so if things don't work with the former, it's worth checking if things do work with the latter.
Adding force_auth=true to flickrOptions fixed this issue for me; previously (13 months ago and version 0.3.36 when I last used) querying my photos by a min_date_taken and max_date_taken range had worked without needing to do this.
I have no idea why that would work, supposedly auth is not required for those two optional arguments.