weevely api
vely API Released
MACOS安裝:
您可以通過Homebrew輕鬆安裝這些:
brew install php mysql composerWindows安裝:
如果需要,您可以在服務器上輕鬆託管此API。但是,如果您只想處理官方使用的數據,則可以跳過此步驟。
要託管API,只需按照以下步驟操作:
composer installdatabase.env文件並將其相應地填充到.env.example文件php artisan migrate以用所需的表填充數據庫php artisan db:seedphp artisan serve啟動API服務器| 行動 | 要求 | 方法 | 要求 |
|---|---|---|---|
| 登記 | /api/auth/register | POST | 數據 |
| 登入 | /api/auth/signin | POST | 數據 |
| 登出 | /api/auth/signout | POST | 承載令牌 |
| 重置密碼 | /api/auth/reset-password | POST | 數據 |
| 更改密碼 | /api/auth/reset-password/{token} | POST | 數據,令牌 |
| 刪除請求 | /api/auth/reset-password/{token}/remove | GET | 令牌 |
| 刷新令牌 | /api/auth/refresh | GET | 承載令牌 |
| 獲取用戶 | /api/auth/me | GET | 承載令牌 |
| 行動 | 要求 | 方法 | 要求 |
|---|---|---|---|
| 更新數據 | /api/users/me | PATCH | 載體令牌,數據 |
| 上傳化身 | /api/users/me/avatar | POST | 載體令牌,數據 |
| 動作 | 要求 | 方法 | 要求 |
|---|---|---|---|
| 獲取我的日曆 | /api/calendars/my/{type} | GET | 載體令牌,類型 |
| 創建日曆 | /api/calendars/my | POST | 載體令牌,數據(可選) |
| 獲取日曆 | /api/calendars/{calendar_id} | GET | 載體令牌,calendar_id |
| 更新日曆 | /api/calendars/{calendar_id} | PATCH | 載體令牌,calendar_id,數據 |
| 刪除日曆 | /api/calendars/{calendar_id} | DELETE | 載體令牌,calendar_id |
| 共享日曆 | /api/calendars/{calendar_id}/share | POST | 載體令牌,calendar_id,用戶(json字符串) |
| 隱藏日曆 | /api/calendars/{calendar_id}/hide | POST | 載體令牌,calendar_id |
| 獲取活動 | /api/calendars/{calendar_id}/events | GET | 載體令牌,calendar_id |
| 創建事件 | /api/calendars/{calendar_id}/events | POST | 載體令牌,calendar_id,數據(可選) |
| 更新事件 | /api/calendars/{calendar_id}/events/{event_id} | PATCH | 載體令牌,calendar_id,數據 |
| 刪除事件 | /api/calendars/{calendar_id}/events/{event_id} | DELETE | 載體令牌,calendar_id |
| 添加假期 | /api/calendars/{calendar_id}/holidays | POST | 攜帶者令牌,calendar_id,數據(國家,年) |
不要忘記與Next.js一起檢查
還請查看我的其他項目並訪問我的網站!