Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded end point #9

Closed
zaeemarshad opened this issue Oct 10, 2017 · 3 comments · Fixed by #31
Closed

Hardcoded end point #9

zaeemarshad opened this issue Oct 10, 2017 · 3 comments · Fixed by #31

Comments

@zaeemarshad
Copy link

The endpoint is hard-coded to cdn.contentful.com which only shows entries that have been published. By making it a run-time config, one can set the endpoint to preview.contentful.com and retrieve entries that are in draft state.

@dlitvakb
Copy link
Collaborator

Hey @zaeemarshad, my Elixir knowledge is not that much, could you consider making a PR to make it configurable but keeping the interface as is?

Cheers

@zaeemarshad
Copy link
Author

zaeemarshad commented Oct 12, 2017

@dlitvakb So I have refactored the code a bit and split it into two modules i.e. Delivery and Preview to represent the endpoints. The interface is the same except that the functions have been moved to Contentful.Functions. I have yet to add tests for preview which I shall do soon time permitting.

@floriank
Copy link
Collaborator

floriank commented May 8, 2020

I have actually not forgotten about this and will enter a Contentful.Preview module that can be used with the Query DSL, see attached PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants