spike-contentful icon indicating copy to clipboard operation
spike-contentful copied to clipboard

Add `environment` option to Contentful connection

Open cinnamonKale opened this issue 6 years ago • 6 comments

This adds a new option to contentful.createClient() that allows for different environments to be specified. More info on environments here.

The default value is master, which is default in every Contentful space. Since environments can be named anything it's up to the user to specify the ID of any other environment.

Next steps:

  1. Add tests

cinnamonKale avatar Sep 17 '19 15:09 cinnamonKale

Looking great so far! Ping me when tests are ready 😀

jescalan avatar Sep 17 '19 15:09 jescalan

@jescalan I think in order to add tests for the staging environment one will need to be created in Contentful. Is that something you can handle, or give access to?

cinnamonKale avatar Sep 17 '19 16:09 cinnamonKale

Unfortunately I can't actually, this package uses contentful's example space which is under their control. I pulled this from some docs and and contentful's own open source libraries. I might try poking around there a bit, or reaching out to contentful?

jescalan avatar Sep 17 '19 22:09 jescalan

Good to know. I'll do some research

cinnamonKale avatar Sep 18 '19 03:09 cinnamonKale

@jescalan is this project still maintained? I noticed spike isn't, but if there's still value in it I'll continue to look into setting up a different example space for tests

cinnamonKale avatar Jan 09 '20 16:01 cinnamonKale

I am not maintaining it personally, but it should still work, and you're welcome to contribute if you'd like!

jescalan avatar Jan 09 '20 16:01 jescalan