We are really enjoying the Bird of the Day on the MagicMirror!
Not sure if this was just a problem for me, but we were finding the same birds were being displayed and they were almost all ducks. I think the nuthatch API was always using the “Default value : 1” for page and “Default value : 25” for pageSize, so there were only 25 possible birds.
With the pageSize of 25 I think there are a maximum of 15 pages in their database. I fudged my .js file like this, but there is probably a better was to do this, I’m not a developer. Something to consider for future updates
getBird: function () {
const randPage = Math.floor(Math.random() * 15) + 1;
const endpoint = this.config.endpoint + "&page=" + randPage;
fetch(endpoint, {
headers: { "api-key": this.config.apiKey },
})