Sfoglia il codice sorgente

New: get share link page list api to share link service

liweihao 5 anni fa
parent
commit
fbf9e88635

+ 7 - 0
src/main/java/com/example/kdan_data_center/datacenter/share/ShareLinkService.kt

@@ -16,6 +16,13 @@ interface ShareLinkService {
             @Query("page") page: Int?
     ): Observable<ShareLinkListData>
 
+    @GET("page_list")
+    fun getShareLinkPageList(
+            @Header("Authorization") accessToken: String,
+            @Query("page") page: Int?,
+            @Query("page_size") pageSize: Int?
+    ):Observable<ShareLinkPageListData>
+
     @GET(".")
     fun getShareLinkInfo(
             @Header("Authorization") accessToken: String,

+ 113 - 0
src/main/java/com/example/kdan_data_center/datacenter/share/data/ShareLinkPageListData.kt

@@ -0,0 +1,113 @@
+package com.example.kdan_data_center.datacenter.share.data
+
+import com.google.gson.annotations.SerializedName
+
+data class ShareLinkPageListData(
+        @SerializedName("data")
+        val `data`: Data,
+        @SerializedName("message")
+        val message: String
+) {
+    data class Data(
+            @SerializedName("current_page")
+            val currentPage: Int,
+            @SerializedName("limit_value")
+            val limitValue: Int,
+            @SerializedName("link_infos")
+            val linkInfos: List<LinkInfo>,
+            @SerializedName("total_count")
+            val totalCount: Int,
+            @SerializedName("total_pages")
+            val totalPages: Int
+    ) {
+        data class LinkInfo(
+                @SerializedName("access_check")
+                val accessCheck: AccessCheck,
+                @SerializedName("app_bundle_id")
+                val appBundleId: String?,
+                @SerializedName("app_id")
+                val appId: Int?,
+                @SerializedName("created_at")
+                val createdAt: String,
+                @SerializedName("expires_at")
+                val expiresAt: String?,
+                @SerializedName("id")
+                val id: Int,
+                @SerializedName("is_alive")
+                val isAlive: Boolean,
+                @SerializedName("link_url")
+                val linkUrl: String,
+                @SerializedName("mission_id")
+                val missionId: Int?,
+                @SerializedName("preview_token")
+                val previewToken: String,
+                @SerializedName("shareable_id")
+                val shareableId: Int,
+                @SerializedName("shareable_info")
+                val shareableInfo: ShareableInfo,
+                @SerializedName("shareable_type")
+                val shareableType: String,
+                @SerializedName("status")
+                val status: String,
+                @SerializedName("updated_at")
+                val updatedAt: String,
+                @SerializedName("url_token")
+                val urlToken: String,
+                @SerializedName("user_id")
+                val userId: Int,
+                @SerializedName("user_id_backup")
+                val userIdBackup: Int?,
+                @SerializedName("verify_data")
+                val verifyData: HashMap<String, String>,
+                @SerializedName("verify_info")
+                val verifyInfo: String?,
+                @SerializedName("verify_type")
+                val verifyType: String
+        ) {
+            data class ShareableInfo(
+                    @SerializedName("shareable_detail")
+                    val shareableDetail: ShareableDetail,
+                    @SerializedName("shareable_exists")
+                    val shareableExists: Boolean
+            ) {
+                data class ShareableDetail(
+                        @SerializedName("active_status")
+                        val activeStatus: String,
+                        @SerializedName("created_at")
+                        val createdAt: String,
+                        @SerializedName("folder_name")
+                        val folderName: String,
+                        @SerializedName("folder_type")
+                        val folderType: String,
+                        @SerializedName("full_path")
+                        val fullPath: String,
+                        @SerializedName("id")
+                        val id: Int,
+                        @SerializedName("in_share_folder")
+                        val inShareFolder: Boolean,
+                        @SerializedName("is_deleted")
+                        val isDeleted: Boolean,
+                        @SerializedName("other_infos")
+                        val otherInfos: HashMap<String, String>,
+                        @SerializedName("parent_id")
+                        val parentId: Int,
+                        @SerializedName("path_string")
+                        val pathString: String,
+                        @SerializedName("updated_at")
+                        val updatedAt: String,
+                        @SerializedName("user_id")
+                        val userId: Int,
+                        @SerializedName("user_updated_at")
+                        val userUpdatedAt: String
+                )
+            }
+
+            data class AccessCheck(
+                    @SerializedName("allow_action")
+                    val allowAction: String,
+                    @SerializedName("verify_type")
+                    val verifyType: String
+            )
+        }
+    }
+}