gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

are there API that get content of multi files

Open zyiLoong opened this issue 5 years ago • 1 comments

like Get file from repository of Repository files . but I provid multi file path (not only one), and get the content of these。 if not,

how can I get content of multi files?

i know i can call the api Get file from repository multi times. but network I/O is expensive。and if a lot of request be recived in a short time......

thanks

zyiLoong avatar Jan 07 '21 08:01 zyiLoong

After reading GitLab documentation, you can't ask multiple files through multi file paths. See available API here: https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository

You can eventually use the get file archive from the Repository API. See https://docs.gitlab.com/ee/api/repositories.html#get-file-archive for GitLab documentation. There is multiple available methods in RepositoryApi class. See https://github.com/gitlab4j/gitlab4j-api/blob/master/src/main/java/org/gitlab4j/api/RepositoryApi.java#L436-L598

jabby avatar Jul 10 '21 10:07 jabby