-
Notifications
You must be signed in to change notification settings - Fork 65
feat: add support for File References API (list/get/add/delete) #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@andrii-bodnar Hi 👋 , |
andrii-bodnar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SrishJ23 Thanks for your contribution! Please address the discussions I started regarding the changes. Also, the new methods should be covered by unit tests.
| /** | ||
| * List File References | ||
| */ | ||
| public ResponseList<FileReference> listFileReferences(Long projectId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new methods should be documented according to the code style used for the rest of the project resources
| import com.crowdin.client.filereferences.model.AddFileReferenceRequest; | ||
| import com.fasterxml.jackson.core.type.TypeReference; | ||
|
|
||
| public class FileReferencesApi extends CrowdinApi { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a new API resource. Please follow the API docs structure and include the new methods in the sourcefiles resource
| /** | ||
| * Request body for creating a new File Reference. | ||
| */ | ||
| @Data | ||
| public class AddFileReferenceRequest { | ||
| private String name; // Name of the reference | ||
| private String type; // Type of the reference (e.g., "file" or "asset") | ||
| private Long fileId; // ID of the file this reference points to | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the project's code style for request models
|
Hi @SrishJ23, do you have an update on this yet? |
|
Hi @andrii-bodnar 👋 Thanks a lot for your time and guidance throughout! 🙏✨ |
|
Hi @SrishJ23, please address the unresolved discussions above |
This PR adds support for the new File References API in the Crowdin Java client.
Endpoints implemented:
Files added:
Closes #341