Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

A guest or an authenticated user can list answers of a question #32

Closed
josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #53
Closed

A guest or an authenticated user can list answers of a question #32

josepostiga opened this issue Oct 3, 2020 · 3 comments · Fixed by #53
Assignees
Labels
story New feature

Comments

@josepostiga
Copy link
Member

josepostiga commented Oct 3, 2020

Scenario

Given I'm a guest or an authenticated user of any type
When I send a GET request to /discussions/questions/{questionId}/answers
I expect to receive a list of paginated, non-deleted, answers resources (15 per page)

Given I'm a guest or an authenticated user of any type
When I send a GET request to /discussions/questions/{questionId}/answers with any searchable properties
I expect to receive a list of paginated, non-deleted, answers resources that match the query param (15 per page)

Given I'm a guest user
When I send more than 30 GET requests to /discussions/questions/{questionId}/answers within a single minute
I expect to receive a 429 Too Many Requests status code until the next minute

Searchable properties

  • author_id: mapped to an author query param (?author={id}).
  • created_at: mapped to a created[] period type query param (?created[from]={start-period}&created[to]={end-period}).

Additional requirements

The list should be ordered from the most recent resources to the eldest.

This builds on the features of #25, which introduces the storage of questions resources.

@josepostiga josepostiga added the story New feature label Oct 3, 2020
@ana-lisboa
Copy link
Contributor

I want to do this one when the dependencies are ready :)

@tiagof
Copy link
Collaborator

tiagof commented Oct 26, 2020

@ana-lisboa I think all dependencies are ready :)

@ana-lisboa
Copy link
Contributor

ana-lisboa commented Oct 26, 2020 via email

ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 1, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 1, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 1, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 5, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 8, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 16, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 17, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 17, 2020
ana-lisboa added a commit to ana-lisboa/api that referenced this issue Nov 22, 2020
josepostiga pushed a commit to ana-lisboa/api that referenced this issue Nov 22, 2020
josepostiga pushed a commit that referenced this issue Nov 22, 2020
… question (#53)

* #32 gets answers from a question

* #32 fix repeated route name

* #32 code review improvements

* #32 adds second round of code review

* #32 adds minor code reviews

* #32 adds final code review

* #32 removes unneeded index

* #32 edits changelog

Co-authored-by: José Postiga <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
story New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants