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

add a movies collection with the ability to create a new movie #4

Merged
merged 9 commits into from
May 7, 2019

Conversation

angelo-v
Copy link
Contributor

@angelo-v angelo-v commented May 2, 2019

Let's discuss and grind this, I will then document it in the cookbook

Live version: https://hydra-movies-aveltens.herokuapp.com

movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/context.jsonld Outdated Show resolved Hide resolved
@tpluscode
Copy link
Contributor

You think you could make the API a little more dynamic?

In this case I would

  1. add some minimal code which echoes the Movie resource POST-ed to the collection and set the Location header to some /movie/{random} URI
  2. add a randomised GET endpoint which would serve lorem ipsum movies from /movie/{random}

This way we could exercise use the API in client app, kind of mimicking a real API.

@angelo-v
Copy link
Contributor Author

angelo-v commented May 2, 2019

You think you could make the API a little more dynamic?

I am not sure if we should do this here. We decided for static files to keep it as a simple example. Making it dynamic distracts from what we want to show. It think it would be better to have a dynamic implementation added as another project.

But perhaps it would be enough to respond with static data to POST?

movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/context.jsonld Outdated Show resolved Hide resolved
movies/src/index.js Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
movies/src/resources/context.jsonld Outdated Show resolved Hide resolved
movies/src/resources/doc.jsonld Outdated Show resolved Hide resolved
Copy link
Contributor

@tpluscode tpluscode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we good here @alien-mcl ?

movies/src/resources/doc.jsonld Show resolved Hide resolved
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 this pull request may close these issues.

3 participants