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

Updated way of getting / updating an address related to a student #88

Merged
merged 1 commit into from
Feb 3, 2017

Conversation

gibarsin
Copy link
Collaborator

@gibarsin gibarsin commented Feb 3, 2017

Summary

  • Get the address of a student it can only be done through a GET to /api/v1/students/{docket}
  • Update the address of a student it can only be done thorugh a POST to /api/v1/students/{docket} with all other information required for a student

Examples

To get the address, do /api/v1/students/2. the JSON Response will be:

{
"address": {
"city": "bs as",
"country": "arg",
"neighborhood": "hola",
"number": 123,
"street": "lala"
},
"dni": 12345681,
"docket": 2,
"email": "fgomez@bait.edu.ar",
"firstName": "papi",
"lastName": "churro"
}

To update the address, send JSON body in POST to /api/v1/students/2:

{"firstName":"papi", "lastName":"churro", "address":{"street":"lala", "neighborhood":"hola", "country":"arg", "city":"bs as", "number":123}}

All the fields in address showed in this JSON body are required
The response should be a 204 if there were no constraints violated.

Trello Card

https://trello.com/c/htr2fnYn/81-devolver-address-con-el-estudiante-y-borrar-endpoint-de-address

- To get the address of a student it can only be done through a GET to /api/v1/students/{docket}
- To update the address of a student it can only be done thorugh a POST to /api/v1/students/{docket} with all other information required for a student
@gibarsin gibarsin merged commit a7ad6dc into development Feb 3, 2017
@gibarsin gibarsin deleted the address branch February 3, 2017 20:23
MatiasComercio pushed a commit that referenced this pull request Feb 5, 2017
- To get the address of a student it can only be done through a GET to /api/v1/students/{docket}
- To update the address of a student it can only be done thorugh a POST to /api/v1/students/{docket} with all other information required for a student
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.

2 participants