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

[REST] Allow to access to program via REST API #270

Open
jlbellido opened this issue Mar 9, 2017 · 3 comments
Open

[REST] Allow to access to program via REST API #270

jlbellido opened this issue Mar 9, 2017 · 3 comments

Comments

@jlbellido
Copy link
Contributor

We need to get the different resources that compose the program via REST. All of the different resources.

  • /api/users/
  • /api/sessions/
  • /api/program/
  • /api/keynotes/
@jlbellido jlbellido self-assigned this Mar 9, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 10, 2017
@jlbellido
Copy link
Contributor Author

Submitter all the REST endpoints:

NOTE: for /api/program/ you must specify a program ID. If not, you'll get an empty response.

@natete
Copy link

natete commented Mar 11, 2017

Hi,

I've been testing the api and it works pretty fine but it'd be nice to have a couple of extra fields in the program endpoint:

  • (field_session: Content) Content: Body
  • (image from field_image) File: URI

To speaker image uri (when it's a keynote) I added a new relationship:

  • (field_session: Content) image from field_image

Finally I had to enable cors. Locally I used the drupal/cors module but maybe there is a better way to do it.

By the way, I was able to get all the info I need for the mobile app just using the users and program endpoints.

@jlbellido
Copy link
Contributor Author

Hi @natete , My apologies because my late reply.

I've added the body to the program endpoint.

Regarding the field_uris I didn't add them because if I do we'll get duplicated the number of rows, and I think it will be hard to handle from your side. If it is ok for you, I'll add them.

Finally, regarding the cors module, I'd like to check an alternatuive way. If it is not blocking you, tomorrow for sure I'll tell you if I find something.

I've pushed my changes, (the body field at the program endpoint.)

jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 13, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 14, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 14, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 14, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 14, 2017
jlbellido added a commit that referenced this issue Mar 14, 2017
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 14, 2017
jlbellido added a commit that referenced this issue Mar 14, 2017
#270: Remove body and add speaker image
jlbellido added a commit to jlbellido/devdaysseville that referenced this issue Mar 16, 2017
jlbellido added a commit that referenced this issue Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants