oorestisime/gatsby-source-instagram

Take an array as options

Opened this issue · 7 comments

Right now if user needs more than one profile or hashtag or.. they need to add the plugin multiple times in the configuration.
The plugin could take an object or an array of objects to improve the options declaration. Handling both cases would help avoid a breaking change.

@oorestisime is this functionality implemented?

nope. PR welcome if you want

Yeap, we can try to implement this.

@oorestisime So should we allow to provide options next way?

{
    resolve: 'gatsby-source-instagram',
    options: [ 
        { type: 'hashtag', hashtag: 'snowing' },
        { username: 'XXXXXX' }
    ] 
}

or smth like that

{
    resolve: 'gatsby-source-instagram',
    options: {
       origins: [ 
            { type: 'hashtag', hashtag: 'snowing' },
            { username: 'XXXXXX' }
        ] 
    }
}

hm i think first way is more concise and better?
also just for information I won't be able to merge this until I finalize release of #24 because we are probably dropping hashtag and profile support since they no longer work. Not sure if this affects what you are currently building but just keep that in mind :)

yeah, let's wait for #24 . Not cool that you need to stop hashtag and profile support(

I haven't researched this but maybe the graph api supports getting hashtag and maybe it could be supported through that.