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

[Android] Implement API for updating Pin/Unpin state in Android app #543

Closed
PatilShreyas opened this issue Oct 5, 2022 · 5 comments · Fixed by #553, #558 or #559
Closed

[Android] Implement API for updating Pin/Unpin state in Android app #543

PatilShreyas opened this issue Oct 5, 2022 · 5 comments · Fixed by #553, #558 or #559
Assignees
Labels
Blocked hacktoberfest For partifipating in Hacktoberfest noty-android
Milestone

Comments

@PatilShreyas
Copy link
Owner

Currently, all work regarding the pin/unpin feature is completed. Just API call invocation implementation is pending from the android app side.

Once #541 is merged, the work on this issue can be started.

@PatilShreyas PatilShreyas added noty-android hacktoberfest For partifipating in Hacktoberfest Blocked labels Oct 5, 2022
@PatilShreyas PatilShreyas added this to the v2.1.0 milestone Oct 5, 2022
@Varsha-Kulkarni
Copy link
Contributor

Please assign this to me, once backend issue is merged, I would love to complete this. Thanks.

@PatilShreyas
Copy link
Owner Author

I guess I replied on the wrong thread. NVM

Ref:
#547 (comment)
#547 (comment)

@tyaporush
Copy link

Hi @PatilShreyas Assign this to me

@PatilShreyas
Copy link
Owner Author

Thanks, @tyaporush for showing interest in contributing to this. Assigning this to you 😄.

@PatilShreyas
Copy link
Owner Author

PatilShreyas commented Oct 7, 2022

@tyaporush Here's the REST API spec for you.


REST API Specification

Request

  • Method: PATCH
  • URL: BASE_URL/note/{note-id}/pin
  • Header: Authorization <TOKEN>
  • Body:
{
  "isPinned": true/false
}

Example:

PATCH https://API_BASE_URL/note/noteId1234/pin
Content-Type: application/json
Authorization: Bearer YOUR_AUTH_TOKEN

{
  "isPinned": true
}

Response

1. When note gets pinned/unpinned successfully

Response Code: 200

{
  "status": "SUCCESS",
  "message": "Note is pinned/unpinned successfully",
  "noteId": <NOTE ID>
}
2. When note note exist in system

Response Code: 404

{
  "status": "NOT_FOUND",
  "message": "Note not exist with ID '$noteId'"
}
3. When unauthorized user tries to update note pin

Response Code: 401

{
  "status": "UNAUTHORIZED",
  "message": "Access denied"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment