vanilla php api
1.0.0
首先,運行以下命令使用git下載項目:
git clone https://github.com/Msalah11/vanilla-php-api.git接下來,進入新項目的文件夾並安裝所有依賴關係:
# move into the new folder
cd vanilla-php-api
# install dependencies
composer install接下來,從Config/database.php編輯數據庫憑據:
' mysql ' => [
' name ' => ' ' , // Database Name
' username ' => ' ' , // Database Username
' password ' => ' ' , // Database Password
' connection ' => ' ' , // Database Connection
]接下來,通過訪問安裝URL遷移數據庫表:
http://YOURSITEURL/install
| 端點 | 方法 | 身體 | 描述 |
|---|---|---|---|
| API/註冊 | 郵政 | 名稱,電子郵件,密碼 | 創建新用戶 |
| API/登錄 | 郵政 | 電子郵件,密碼 | 登錄帳戶 |
| API/密碼收集 | 郵政 | 電子郵件 | 重置密碼 |
| 端點 | 方法 | 身體 | 描述 |
|---|---|---|---|
| API/列表 | 得到 | 獲取所有列表 | |
| api/lists/{id} | 得到 | 獲取ID列表 | |
| API/列表 | 郵政 | 姓名 | 創建新列表 |
| api/lists/{id} | 放 | 姓名 | 更新列表 |
| API/列表 | 刪除 | ID | 刪除列表 |
| api/lists/{id}/item | 郵政 | 姓名 | 將新項目添加到列表 |