-
Notifications
You must be signed in to change notification settings - Fork 38
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 learn site API contacts #68
base: main
Are you sure you want to change the base?
Conversation
"publishedDate": timestamp, | ||
"likes": number, | ||
"bookmarkedBy": "<userId>", | ||
"bookmarkedDate": timestamp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will this contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swarajpure
publishedDate
contains the original article/video published data. This will help us to implement sort feature.
likes
contains number of a feed received so far. (This is similar to instagram likes)
bookmarkedBy
contains RDS user id who submitted the feed
bookmarkedDate
contains date on which RDS user submitted the feed
Please refer below 2 links for further details
https://excalidraw.com/
https://github.com/Real-Dev-Squad/website-learn/wiki
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this complete document for one single user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This structure is not for any single "user" but it is structure of a "feed". I used the words "feed" and "bookmark" loosely for the same entity. A user might add multiple feed/bookmark but a feed/bookmark must have only one author and only one bookmarkedBy value.
"author": "Name of the author", | ||
"publishedDate": timestamp, | ||
"likes": number, | ||
"bookmarkedBy": "<userId>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a discussion related to having a different structure right, is it something in pipeline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed multiple things but not concluded with concrete plan. I guess, @SBagaria2710 might arrange a meeting to finalise how to proceed further.
<feed2> | ||
] | ||
, | ||
"isLast": boolean<yes|no>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really liked the the planning behind this property
|
||
| Route | Description | | ||
| :--------------------------------: | :---------------: | | ||
| [GET /feeds](#get-feeds) | Returns all feeds | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about get feeds
by ID , If I need to know more about particular feed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET /bookmark/:id
I used feed and bookmark loosely for same entity. I choose that approach for a reason but it creates more confusion, so will stick to one while revamping after proposed meeting.
``` | ||
|
||
- **Error Response:** | ||
- **Code:** 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
401 missing? Can unauthorised users also proceed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only authorized users can access this end point. Updated.
- **Content:** `<No Content>` | ||
|
||
- **Error Response:** | ||
- **Code** 404 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, will this be public route? No cookie/auth required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is open to consume non users also.
learn/README.md
Outdated
- **Error Response:** | ||
- **Code:** 500 | ||
- **Content:** `{ 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' }` | ||
- **Code:** 409 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please have the error responses sorted by their codes? Becomes easier to look at them, in my opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorted.
- **Error Response:** | ||
- **Code** 404 | ||
- **Content** `{ 'statusCode': 404, 'error': 'Not found', 'message': 'No bookmark found' }` | ||
- **Code:** 401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: sorting by error codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharp eye !
Sorted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving from my side
Looks very exciting! 🔥
API contract defined based on discussions in standup meetings.