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
Novu_Bot
Novu_Bot12mo ago
@Mr.__palindrome, you just advanced to level 1!
mr-palindrome
mr-palindrome12mo ago
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!
Pawan Jain
Pawan Jain12mo ago
@Mr.__palindrome Give us some time let us ping python sdk maintainer
mr-palindrome
mr-palindrome12mo ago
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!!
Pawan Jain
Pawan Jain12mo ago
@unicodeveloper Can you please help here?
Prosper
Prosper12mo ago
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?
mr-palindrome
mr-palindrome12mo ago
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
Prosper
Prosper12mo ago
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.
mr-palindrome
mr-palindrome12mo ago
Sure! Confirm me ones.. then I'll raise the PR!
Prosper
Prosper12mo ago
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
mr-palindrome
mr-palindrome12mo ago
Thanks for the update🙂
Novu_Bot
Novu_Bot12mo ago
@Nayan, you just advanced to level 2!
mr-palindrome
mr-palindrome12mo ago
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
Prosper
Prosper12mo ago
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
mr-palindrome
mr-palindrome12mo ago
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?
Want results from more Discord servers?
Add your server