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

Implement APIs to load most appreciated users #62

Open
recrsn opened this issue Jan 27, 2021 · 0 comments
Open

Implement APIs to load most appreciated users #62

recrsn opened this issue Jan 27, 2021 · 0 comments
Assignees

Comments

@recrsn
Copy link
Member

recrsn commented Jan 27, 2021

We need an API for loading information such as "Most Appreciated Users"

See:

This is a larger part of "meta" APIs to be grouped under "/api/meta"

Acceptance criteria

Expected request:

GET /api/meta/most_appreciated_users

Expected response: Array of most appreciated users

200 OK
Content-type: application/json

 
[
	  {
		  "name": "User",
		  "designation": "Developer",
		  "teamName": "Engineering",
		  "email": "[email protected]",
		  "profilePic": "https://example.com/image.jpg",
		  "username": "user",
		  "createdAt": "2021-02-09 21:35:24+05:30"
	  },
	  {
		  "name": "User2",
		  "designation": "Developer",
		  "teamName": "Engineering",
		  "email": "[email protected]",
		  "profilePic": "https://example.com/image2.jpg",
		  "username": "user2",
		  "createdAt": "2021-02-09 21:35:24+05:30"
	  }
]

Tasks

We already have a query to get the most appreciated users here: https://github.com/snowflake-app/snowflake/blob/master/snowflake/models/appreciation.py#L57 So, the scope of this issue is limited to creating the controller to return the data in the appropriate format.

@recrsn recrsn changed the title Implement APIs to load meta information Implement APIs to load most appreciated users Jan 27, 2021
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