Closed andrii-bodnar closed 10 months ago
@andrii-bodnar Can I take this up?
@Riju-bak sure, thanks a lot! 🚀
The reference doesn't mention what fields the response data must contain. Also, it isn't clear what the acceptable string values of applicationIdentifier and path must be.
@Riju-bak application - is a type of web application hosted on a separate domain that can be installed in Crowdin like a plugin.
Each application has its own identifier (applicationIdentifier
) - it can be any string identifier. It is defined by the application itself. path
is an endpoint implemented in the app.
For example - we have a Video Preview app that defines its own API - https://video-preview.awesome-crowdin.com/manifest.json. In this case - the identifier would be preview-video
and path
- /configure
.
The data
in this API can be any JSON object. Each application defines what payload it accepts for its endpoints.
@andrii-bodnar @innomaxx Since each application defines what payload (body) it accepts, to Edit Application Data in crowdin-api-client-dotnet
it must accept a patch request with a body of type object
to make it generic.
However, note that the SendPatchRequestMethod inside CrowdinApiClient.cs
requires the body to be of type IEnumerable<PatchEntry>
. This won't work for all applications.
Of course we can just change the body type to object
, but before doing that, could either of you confirm whether or not it won't break the client's ability to send PATCH requests. I don't know if there's some internal aspect of the code-base that requires using IEnumerable<PatchEntry>
over object
.
@Riju-bak we can add extra overload for method SendPatchRequest
(or create entirely new method like SendRawPatchRequest
) that accepts raw System.Object
as parameter instead of collection of patches. We use the same approach with method SendDeleteRequest_FullResult
In future this solution can be modified or replaced by something better since it's not a part of public API
@innomaxx Got it. In that case I'll add an extra overloaded SendPatchRequest
method for now.
@andrii-bodnar PR is now ready to review
Crowdin has recently added new endpoints for managing custom applications. Support for these endpoints is missing in this Crowdin API client.
We need to add support for the following endpoints: