Add the ability to query a single user album
aleccool213 opened this issue · comments
Alec Brunelle commented
Chris Searle commented
This is almost possible already.
The start will be adding the following to gatsby-config:
{
resolve: 'gatsby-source-flickr',
options: {
api_key: YOUR_FLICKR_KEY,
user_id: YOUR_FLICKR_USER,
// Add the following lines
method: 'flickr.photosets.getPhotos',
photoset_id: NUMERIC_ID_OF_ALBUM,
},
},
However - there is one thing I have to change in code first - search returns this structure:
{
"photos": {
"photo": [ list of photos ],
}
getPhotos here returns this structure:
{
"photoset": {
"photo": [ list of photos ],
}
So - I need to make it cope with a different outer object name.
I'll try and look at this during the weekend.
Chris Searle commented
Should be working in 0.0.2 (see readme for example)
Alec Brunelle commented
Amazing, thanks for the quick response. This was the one thing blocking me from using this repo! 💯