All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bimface.sdk.interfaces.FileInterface Maven / Gradle / Ivy

The newest version!
package com.bimface.sdk.interfaces;

import com.bimface.file.bean.*;
import com.glodon.paas.foundation.restclient.RESTResponse;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.List;

public interface FileInterface {
    @PUT("upload")
    Call> uploadFileStream(@Query("name") String fileName, @Query("sourceId") String sourceId,
                                                  @Header("Content-Length") Long fileLength, @Body RequestBody file,
                                                  @Header("Authorization") String accessToken);

    @PUT("upload")
    Call> uploadFileByUrl(@Query("name") String fileName, @Query("sourceId") String sourceId,
                                                 @Query("url") String url, @Query("etag") String etag,
                                                 @Header("Authorization") String accessToken);

    @PUT("upload")
    Call> uploadFileFromOSS(@Query("name") String fileName, @Query("sourceId") String sourceId,
                                                   @Query("bucket") String ossBucket, @Query("objectKey") String ossObjectKey,
                                                   @Header("Authorization") String accessToken);

    @GET("upload/policy")
    Call> getUploadPolicy(@Query("name") String fileName, @Query("sourceId") String sourceId,
                                                         @Header("Authorization") String accessToken);

    @GET("support")
    Call> getSupportFileTypes(@Header("Authorization") String accessToken);

    @DELETE("file")
    Call> deleteFile(@Query("fileId") Long fileId, @Header("Authorization") String accessToken);

    @POST("appendFiles")
    Call> createAppendFile(@Query("name") String fileName, @Query("sourceId") String sourceId,
                                                        @Query("length") Long fileLength, @Header("Authorization") String accessToken);

    @GET("appendFiles/{appendFileId}")
    Call> getAppendFile(@Path("appendFileId") Long appendFileId, @Header("Authorization") String accessToken);

    @POST("appendFiles/{appendFileId}/data")
    Call> appendUpload(@Path("appendFileId") Long appendFileId, @Query("position") Long position,
                                                    @Body RequestBody body, @Header("Authorization") String accessToken);

    @GET("metadata")
    Call> getFileMetaData(@Query("fileId") Long fileId, @Header("Authorization") String accessToken);

    @GET("files/{fileId}")
    Call> getFile(@Path("fileId") Long fileId, @Header("Authorization") String accessToken);

    @GET("files")
    Call>> getFiles(@Query("suffix") String suffix,
                                                @Query("status") String status,
                                                @Query("startTime") String startTime,
                                                @Query("endTime") String endTime,
                                                @Query("offset") Long offset,
                                                @Query("rows") Long rows,
                                                @Header("Authorization") String accessToken);

    @GET("files/{fileId}/uploadStatus")
    Call> getFileUploadStatus(@Path("fileId") Long fileId, @Header("Authorization") String accessToken);

    @GET("download/url")
    Call> getFileDownloadUrl(@Query("fileId") Long fileId, @Query("name") String fileName, @Header("Authorization") String accessToken);

    @POST
    Call> uploadByPolicy(@Url String uploadUrl, @Body RequestBody requestBody);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy