Closed andrii-bodnar closed 1 year ago
Hi @andrii-bodnar, Could you please assign me this.
Hi @andrii-bodnar, Sorry for the delay. Here for sending notification do we have to get the list of all the authenticated users and then send the notification to users?
Hi @Durdush, no, we don't need to get a list, we just need to implement methods to call the described Crowdin APIs.
Hi @andrii-bodnar, here for authenticated users and organisation members url is same, so there my test cases are failing. Is it alright, can you confirm
@Durdush could you please provide more details? I don't fully understand what you mean
For two api, sendNotificationToAuthenticatedUsers and sendNotificationToOrganizationMembers Url is same which is {protocol}://{host}/api/v2/notify So when i am creating testCases it is giving me exception of Duplicate key RequestMock(url=https://testOrganization.api.crowdin.com/api/v2/notify My actual question is why two api's have same URL?
@Durdush thanks for the details!
It's ok that these APIs have the same URL since these methods belong to different crowdin editions (crowdin.com, Crowdin Enterprise)
It would be acceptable to have a test for only one API method (sendNotificationToAuthenticatedUsers or sendNotificationToOrganizationMembers)
Thanks @andrii-bodnar! Still I am facing a small issue, when i am creating a request mock with RequestMock.build method, it is taking my request file as a response file as it doesn't contain the any implementation of this method in which we just pass request file only. Please suggest if there any other way in which i can implement the mock request with request file only.
Crowdin API has a new Notifications API that allows sending notifications to the project and organization members. It would be great to add support for this API in this Crowdin API client.
API reference: