Adding Missing Method for Environments in python SDK
Hey folks, I am working on the following issue https://github.com/novuhq/novu-python/issues/74. I need help in understanding the updateMyEnvironment API (https://api.novu.co/api#/Environments/EnvironmentsController_updateMyEnvironment). It would be really help-full if any maintainer or contributor can help me in with it!
GitHub
Issues · novuhq/novu-python
Python SDK for Novu - The open-source notification infrastructure for engineers. 🚀 - Issues · novuhq/novu-python
24 Replies
@Mr.__palindrome, you just advanced to level 1!
I tried to work with it but I'm really confused what the different payload parameters means. like dns and inboundParseDomain.
And do I need to add them in its respective dto (EnvironmentDto) as no dns or inboundParseDomain keyword defination is mentioned!
@Mr.__palindrome
Give us some time
let us ping python sdk maintainer
hey @Pawan Jain no one from the maintainer team reached to me yet.. I'm stuck at this issue from over a week. All of my development has been done but I'm stuck at writing the test case as I could not figure out the use case of the API!!
@unicodeveloper
Can you please help here?
I am not sure how to help here @Mr.__palindrome
What exactly do you need help understanding?
There are other methods in the specific class you are working with in the SDK on this issue with sample code on how to achieve the methods you are adding to that class.
Some require normal parameters, some require setting up a dto to pass as a parameter.
So do you need additional clarity on on what to put in the api reference docs to test it out or what’s the need here?
Hey @unicodeveloper, I tried playing with the api reference that is available on https://docs.novu.co/api-reference/environments/update-env-by-id to understand the endpoint and write the test cases but whenever I hit the request I am getting 401(unauthorized). I checked and verified that the api key which I'm using is correct as I can hit other endpoints using it. Here is a screenshot for the reference.
It would be really helpfull if you can explain the use case of the api and the use case of different keywords int he payload!
![No description](https://cdn.answeroverflow.com/1161343679991124048/image.png)
I think I might know the issue now. Thanks for providing more clarity. From the response here, it is saying "API endpoint not available".
This means the API endpoint might not be public facing. If I am right, then we probably need to remove it from the API reference and need not add it anymore to the SDK.
Please let me come back to you on this issue.
Sure! Confirm me ones.. then I'll raise the PR!
Hey @Nayan We have now removed this API endpoint. It has also been removed from the API reference docs.
So please go ahead only with the regenerate API keys functionality
Thanks for the update🙂
@Nayan, you just advanced to level 2!
Hey @unicodeveloper, sorry for distrubing you again. The endpoint is removed from Novu documentation but it is still visible in the swagger documentation (https://api.novu.co/api#/Environments/EnvironmentsController_updateMyEnvironment)
Can you remove this from here as well! Otherwise it can create confusion to other contributors!
![No description](https://cdn.answeroverflow.com/1161675821338066995/image.png)
It's still available in the Swagger docs because the next release is not out yet. When it's out and tagged, it will no longer be visible
Okay thank you!
BTW I am also facing issue in writing the test case for the regenerate method as after regenerating the api key is changing!
Any idea how can I tackle that?