内容へ移動
ModParks Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
トレース:
api:v1
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== ModParks API Documentation (v1) ====== 全エンドポイントは ``/api/v1`` をプレフィックスとする。 ===== 認証 ===== 読み取り系のパブリックエンドポイントは認証不要だ。\\ 一部の保護されたエンドポイントは ``Authorization`` ヘッダーに Bearer トークンが必要となる。 <code> Authorization: Bearer <your_api_key> </code> 認証が必要なエンドポイントに対してヘッダーが不正・欠落している場合: <code json> { "error": "Missing or invalid Authorization header" } </code> ===== Projects API ===== ==== GET /api/v1/projects/[slug] ==== 指定スラッグのプロジェクト詳細を取得する。 ^ 項目 ^ 内容 ^ | Method | ``GET`` | | 認証 | 不要 | **Response (200 OK)** <code json> { "id": "12345", "slug": "sample-mod", "name": "Sample Mod", "description": "A sample mod for Minecraft", "iconUrl": "https://example.com/icon.png", "type": "mod", "license": "MIT", "sourceUrl": "https://github.com/...", "downloads": 1500, "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-06-01T00:00:00Z", "author": { "username": "Pitan76", "displayName": "Pitan", "avatarUrl": "https://github.com/..." }, "categories": ["Utility", "Magic"], "tags": ["fabric", "forge"] } </code> **Error (404 Not Found):** プロジェクトが存在しないか非公開の場合。 ===== Versions API ===== ==== GET /api/v1/projects/[slug]/versions ==== 指定プロジェクトの全バージョン一覧を取得する。 ^ 項目 ^ 内容 ^ | Method | ``GET`` | | 認証 | 不要 | **Response (200 OK)** <code json> { "versions": [ { "id": "abc-123", "versionNumber": "1.0.0", "mcVersions": ["1.20.1", "1.20.2"], "loaders": ["fabric", "forge"], "changelog": "Initial release", "fileUrl": "https://...", "fileName": "sample-mod-1.0.0.jar", "fileSize": 1024000, "downloads": 500, "createdAt": "2026-06-01T00:00:00Z" } ] } </code> ===== Users API ===== ==== GET /api/v1/users/[username] ==== 指定ユーザーの公開プロフィールを取得する。 ^ 項目 ^ 内容 ^ | Method | ``GET`` | | 認証 | 不要 | **Response (200 OK)** <code json> { "id": "user-123", "username": "Pitan76", "displayName": "Pitan", "avatarUrl": "https://github.com/...", "bio": "Minecraft Mod Developer", "createdAt": "2026-01-01T00:00:00Z" } </code> **Error (404 Not Found):** ユーザーが存在しない場合。 ===== Ideas API ===== ==== GET /api/v1/ideas ==== アイデアボードの投稿一覧を取得する。 ^ 項目 ^ 内容 ^ | Method | ``GET`` | | 認証 | 不要 | **Query Parameters** ^ パラメータ ^ 必須 ^ デフォルト ^ 最大値 ^ 説明 ^ | ``limit`` | 任意 | 20 | 50 | 取得件数 | **Response (200 OK)** <code json> { "ideas": [ { "id": "idea-1", "title": "We need a better minimap mod", "description": "It would be great if...", "author": { "username": "player1", "avatarUrl": "https://..." }, "createdAt": "2026-06-01T00:00:00Z" } ] } </code> ===== Current User Profile API(要認証) ===== ==== GET /api/v1/profile ==== ログイン中ユーザー自身のプロフィールを取得する。 ^ 項目 ^ 内容 ^ | Method | ``GET`` | | 認証 | 必要(セッション Cookie) | **Response (200 OK)** <code json> { "id": "user-123", "username": "Pitan76", "displayName": "Pitan", "avatarUrl": "https://github.com/...", "bio": "Minecraft Mod Developer", "locale": "ja" } </code> **Error (401 Unauthorized):** 未ログインの場合。 ===== 関連ページ ===== * [[start|トップページ]]
api/v1.txt
· 最終更新:
2026/06/16 21:34
by
admin
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ