telefonicaid / telefonicaid/iotagent-node-lib
Not possible to update a subscription
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 90
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Description
I use version 2.16 of the iotagent-node-lib libary.
There are methods to adding a subscription (function subscribe(device, triggers, content, callback)) and for removing a subscription function unsubscribe(device, id, callback). These methods are OK.
But I need a method to update a subscription, implementing the http method PATCH /v2/subscriptions.
Workaround of doing first a subscribe and then an unsubscribe is not sufficient
- registration id will change, so I will need to write more code (without much value)
- notifications could be lost between the subscribe and the unsubscribe
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the subscribe(device, triggers, content, callback) and unsubscribe(device, id, callback) methods in iotagent-node-lib and review how they call the subscription API. Check the existing subscription handling around the /v2/subscriptions endpoint. Done means exposing an update operation using PATCH while preserving the subscription registration id and avoiding notification gaps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100