{ "openapi": "3.0.0", "info": { "title": "App Store API", "description": "App Store API v2.0 - 提供应用商店的各种数据接口", "version": "2.0.0" }, "servers": [ { "url": "http://localhost/APP Store", "description": "本地开发服务器" } ], "paths": { "/api.php": { "get": { "summary": "API端点总览", "description": "显示所有可用的API端点信息", "parameters": [ { "name": "t", "in": "query", "description": "API类型参数,留空则显示所有端点", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "成功获取端点信息", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "App Store API v2.0" }, "endpoints": { "type": "object", "additionalProperties": { "type": "string" } }, "example": { "type": "string", "example": "/api.php?t=getallapps" } } } } } } } } }, "/api.php?t=getallapps": { "get": { "summary": "获取所有应用列表", "description": "获取所有已批准的应用列表,支持分页", "parameters": [ { "name": "page", "in": "query", "description": "页码", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "limit", "in": "query", "description": "每页数量", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100 } } ], "responses": { "200": { "description": "成功获取应用列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "apps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string" }, "age_rating": { "type": "string" }, "version": { "type": "string" }, "avg_rating": { "type": "number" }, "total_downloads": { "type": "integer" } } } }, "pagination": { "type": "object", "properties": { "total": { "type": "integer" }, "page": { "type": "integer" }, "limit": { "type": "integer" }, "totalPages": { "type": "integer" } } } } } } } } } } } } }, "/api.php?t=getappinfo": { "get": { "summary": "获取应用详细信息", "description": "获取指定应用的详细信息,包括版本、图片和标签", "parameters": [ { "name": "id", "in": "query", "description": "应用ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "成功获取应用信息", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string" }, "age_rating": { "type": "string" }, "version": { "type": "string" }, "avg_rating": { "type": "number" }, "total_downloads": { "type": "integer" }, "platforms": { "type": "array" }, "versions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "version": { "type": "string" }, "changelog": { "type": "string" }, "file_path": { "type": "string" }, "download_count": { "type": "integer" }, "created_at": { "type": "string" } } } }, "images": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "image_path": { "type": "string" } } } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } } } } } }, "400": { "description": "无效的应用ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "请提供有效的应用ID" } } } } } }, "404": { "description": "未找到应用", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "未找到该应用" } } } } } } } } }, "/api.php?t=getalltags": { "get": { "summary": "获取所有标签", "description": "获取所有可用的应用标签", "responses": { "200": { "description": "成功获取标签列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } } } } } } } } } }, "/api.php?t=gettagapp": { "get": { "summary": "获取标签下的应用", "description": "获取指定标签下的所有应用列表,支持分页", "parameters": [ { "name": "id", "in": "query", "description": "标签ID", "required": true, "schema": { "type": "integer" } }, { "name": "page", "in": "query", "description": "页码", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "limit", "in": "query", "description": "每页数量", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100 } } ], "responses": { "200": { "description": "成功获取标签下的应用列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "tag": { "type": "object", "properties": { "name": { "type": "string" } } }, "apps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string" }, "age_rating": { "type": "string" }, "version": { "type": "string" }, "avg_rating": { "type": "number" } } } }, "pagination": { "type": "object", "properties": { "total": { "type": "integer" }, "page": { "type": "integer" }, "limit": { "type": "integer" }, "totalPages": { "type": "integer" } } } } } } } } } }, "400": { "description": "无效的标签ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "请提供有效的标签ID" } } } } } }, "404": { "description": "未找到标签", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "未找到该标签" } } } } } } } } }, "/api.php?t=getdeveloperapp": { "get": { "summary": "获取开发者的应用", "description": "获取指定开发者的所有应用列表,支持分页", "parameters": [ { "name": "id", "in": "query", "description": "开发者ID", "required": true, "schema": { "type": "integer" } }, { "name": "page", "in": "query", "description": "页码", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "limit", "in": "query", "description": "每页数量", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100 } } ], "responses": { "200": { "description": "成功获取开发者的应用列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "developer": { "type": "object", "properties": { "username": { "type": "string" } } }, "apps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": "string" }, "age_rating": { "type": "string" }, "version": { "type": "string" }, "created_at": { "type": "string" } } } }, "pagination": { "type": "object", "properties": { "total": { "type": "integer" }, "page": { "type": "integer" }, "limit": { "type": "integer" }, "totalPages": { "type": "integer" } } } } } } } } } }, "400": { "description": "无效的开发者ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "请提供有效的开发者ID" } } } } } }, "404": { "description": "未找到开发者", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "未找到该开发者" } } } } } } } } }, "/api.php?t=getdeveloperinfo": { "get": { "summary": "获取开发者信息", "description": "获取指定开发者的详细信息,包括应用数量和下载量", "parameters": [ { "name": "id", "in": "query", "description": "开发者ID", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "成功获取开发者信息", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "id": { "type": "integer" }, "username": { "type": "string" }, "email": { "type": "string" }, "created_at": { "type": "string" }, "app_count": { "type": "integer" }, "total_downloads": { "type": "integer" } } } } } } } }, "400": { "description": "无效的开发者ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "请提供有效的开发者ID" } } } } } }, "404": { "description": "未找到开发者", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "未找到该开发者" } } } } } } } } }, "/api.php?t=getalldevelopers": { "get": { "summary": "获取所有开发者列表", "description": "获取所有开发者的列表,支持分页", "parameters": [ { "name": "page", "in": "query", "description": "页码", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "limit", "in": "query", "description": "每页数量", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100 } } ], "responses": { "200": { "description": "成功获取开发者列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "developers": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "username": { "type": "string" }, "email": { "type": "string" }, "created_at": { "type": "string" }, "app_count": { "type": "integer" }, "total_downloads": { "type": "integer" } } } }, "pagination": { "type": "object", "properties": { "total": { "type": "integer" }, "page": { "type": "integer" }, "limit": { "type": "integer" }, "totalPages": { "type": "integer" } } } } } } } } } } } } }, "/api.php?t=getacc": { "get": { "summary": "获取所有公告", "description": "获取所有系统公告", "responses": { "200": { "description": "成功获取公告列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "content": { "type": "string" }, "created_at": { "type": "string" } } } } } } } } } } } }, "/api.php?t=getcount": { "get": { "summary": "获取计数信息", "description": "获取应用商店的各类统计信息", "responses": { "200": { "description": "成功获取计数信息", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "total_apps": { "type": "integer" }, "total_developers": { "type": "integer" }, "total_tags": { "type": "integer" }, "total_announcements": { "type": "integer" }, "total_downloads": { "type": "integer" } } } } } } } } } } }, "/api.php?t=getappversions": { "get": { "summary": "获取应用版本列表", "description": "获取指定应用的所有版本列表,支持分页", "parameters": [ { "name": "id", "in": "query", "description": "应用ID", "required": true, "schema": { "type": "integer" } }, { "name": "page", "in": "query", "description": "页码", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "limit", "in": "query", "description": "每页数量", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100 } } ], "responses": { "200": { "description": "成功获取版本列表", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "app_id": { "type": "integer" }, "versions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "version": { "type": "string" }, "changelog": { "type": "string" }, "file_path": { "type": "string" }, "download_count": { "type": "integer" }, "created_at": { "type": "string" } } } }, "pagination": { "type": "object", "properties": { "total": { "type": "integer" }, "page": { "type": "integer" }, "limit": { "type": "integer" }, "totalPages": { "type": "integer" } } } } } } } } } }, "400": { "description": "无效的应用ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "请提供有效的应用ID" } } } } } }, "404": { "description": "未找到应用", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "未找到该应用" } } } } } } } } } } }