HiddenAfternoon
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # twitter API文件 # admin相關API文件 ## POST api/admin/users ### 用途:後台登入 ### Parameters N/A ### Request Body ``` { "account": "root", "password": "12345678" } ``` ### Response Success | code : 200 ``` { "status": "success", "message": "成功登入", "data": { "token": "eyJhbGciOiJIUzI1NiIsInR5cC...", "user": { "id": 13, "account": "root", "name": "root", "email": "root@example.com", "avatar": null, "introduction": null, "cover": null, "role": "admin", "createdAt": "2022-07-29T07:28:40.000Z", "updatedAt": "2022-07-29T07:28:40.000Z" } } } ``` Failure Response ``` 帳號或密碼輸入錯誤 code : 500 { "status": "error", "message": "帳號或密碼不正確!" } 以使用者之帳密登入 code : 403 { "status": "error", "message": "帳號不存在!" } ``` --- ## GET api/admin/users ### 用途:後台瀏覽所有users ### Parameters N/A ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "成功取得所有使用者之資料", "data": [ { "id": 15, "account": "user2", "name": "user2", "email": "user2@example.com", "avatar": "https://loremflickr.com/320/240/cat/?lock=75.13205674938455", "TweetsCount": 10, "LikesCount": 1, "FollowingCount": 2, "FollowerCount": 1 },... ] } ``` Failure Response ``` 未使用admin帳號登入 code : 403 { "status": "error", "message": "帳號不存在!" } ``` --- ## GET api/admin/tweets ### 用途:後台取得所有tweets ### Parameters N/A ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "成功取得所有推文資料", "data": [ { "id": 152, "description": "gogogo~~~~", "userId": 14, "createdAt": "2022-07-31T11:28:25.000Z", "updatedAt": "2022-07-31T11:28:25.000Z", "UserId": 14, "User": { "id": 14, "account": "user1", "name": "user1", "email": "user1@example.com", "avatar": "https://i.imgur.com/sRvXw9X.jpeg", "introduction": "Delectus placeat veniam velit aut eius.", "cover": "https://i.imgur.com/hCJiDle.png", "role": "user", "createdAt": "2022-07-29T07:28:40.000Z", "updatedAt": "2022-07-31T13:39:35.000Z" } }, ... ] } ``` Failure Response ``` 未使用admin帳號登入 code : 403 { "status": "error", "message": "帳號不存在!" } ``` --- ## DELETE api/admin/tweets/:id ### 用途:後台刪除一篇tweet ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |tweet的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "成功刪除", "data": { "id": 1, "description": "Dolores et et non ut aliquam iure.", "userId": 2, "createdAt": "2022-07-31T15:13:35.000Z", "updatedAt": "2022-07-31T15:13:35.000Z", "UserId": 2 } } ``` Failure Response ``` 沒有這篇tweet code : 500 { "status": "error", "message": "Error: 這篇推文不存在" } 未使用admin帳號登入 code : 403 { "status": "error", "message": "帳號不存在!" } ``` --- # user相關API文件 ## POST /api/users ### 用途:註冊 ### Parameters N/A ### Request Body { "email": "qwe@qwe", "account": "qwe", "name":"qwe", "password": "123", "checkPassword" : "123" } ### Response Success | code : 200 ``` { "status": "success", "message": "成功註冊", "data": { "id": 7, "account": "qwe", "name": "qwe", "email": "qwe", "password": "$2a$10$tqyu99AioH9AAgJlFrOREOky7kh9SSCAheS0r7H/HV81yyu9AweHy", "avatar": "https://loremflickr.com/320/240/cat/?lock=42.40756706111952", "cover": "https://i.imgur.com/hCJiDle.png", "role": "user", "updatedAt": "2022-08-03T07:52:32.836Z", "createdAt": "2022-08-03T07:52:32.836Z" } } ``` Failure Response ``` 帳號與email已被註冊 code : 500 { "status": "error", "message": "Error: email 已重複註冊!account 已重複註冊!" } 帳號已被註冊 code : 500 { "status": "error", "message": "Error:account 已重複註冊!" } email已被註冊 code : 500 { "status": "error", "message": "Error: email 已重複註冊!" } ``` --- ## POST /api/users/signin ### 用途:使用者登入 ### Parameters N/A ### Request Body { "account": "user1", "password": "12345678" } ### Response Success | code : 200 ``` { "status": "success", "message": "成功登入", "data": { "token": "eyJhbGciOiJIUzI1NiIsInR5c...", "user": { "id": 2, "account": "user1", "name": "user1", "email": "user1@example.com", "avatar": "https://loremflickr.com/320/240/cat/?lock=67.90250968814848", "introduction": "Temporibus occaecati aut.", "cover": "https://i.imgur.com/hCJiDle.png", "role": "user", "createdAt": "2022-08-03T07:22:25.000Z", "updatedAt": "2022-08-03T07:22:25.000Z" } } } ``` Failure Response ``` 帳號或密碼不正確 code : 500 { "status": "error", "message": "帳號或密碼不正確" } 以admin之帳密登入 code : 403 { "status": "error", "message": "帳號不存在!" } ``` --- ## GET /api/users/currentUser ### 用途:拿到當前使用者資訊 ### Parameters N/A ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "成功取得當前使用者之資訊", "currentUserData": { "id": 2, "account": "user1", "name": "user111", "email": "user1@example.com", "avatar": "https://loremflickr.com/320/240/cat/?lock=91.86647035079582", "introduction": "13253944", "cover": "https://i.imgur.com/hCJiDle.png", "role": "user", "createdAt": "2022-08-06T05:03:48.000Z", "updatedAt": "2022-08-06T08:36:27.000Z" } } ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } ``` --- ## GET /api/users/:id ### 用途:拿到一筆使用者資訊 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "成功取得使用者資料", "user": { "id": 3, "account": "user2", "name": "ihoihhuhuiahoihuhui4", "email": "user22@com", "avatar": "https://loremflickr.com/320/240/cat/?lock=33.20096626002924", "cover": "https://i.imgur.com/hCJiDle.png", "introduction": "aaaaaihoiui46aihoihuhui465465", "TweetsCount": 9, "LikesCount": 1, "FollowingCount": 2, "FollowerCount": 1, "isFollowing": true, "isCurrentUser": false } } ``` Failure Response ``` id不正確,沒有這個user code : 500 { "status": "error", "message": "Error: user doesn't exist" } 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } ``` --- ## GET /api/users/:id/followings ### 用途:看見某使用者跟隨中的人 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功!", "data": [ { "followingId": 3, "createdAt": "2022-08-02T15:35:48.000Z", "avatar": "https://loremflickr.com/320/240/cat/?lock=86.87755869395491", "name": "user1", "introduction": "13253944", "isFollowing": false } ] } ``` Failure Response ``` 使用者不存在 : 500 { "status": "error", "message": "Error: 使用者不存在" } ``` --- ## GET /api/users/:id/followers ### 用途:看見某使用者的跟隨者 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功!", "data": [ { "followerId": 6, "createdAt": "2022-08-02T15:35:48.000Z", "avatar": "https://loremflickr.com/320/240/cat/?lock=81.7206299022412", "name": "user5", "introduction": "Quod et eum recusandae dolore omnis ad id numquam.", "isFollowing": true }, ... ] } ``` Failure Response ``` 使用者不存在 : 500 { "status": "error", "message": "Error: 使用者不存在" } ``` --- ## PUT /api/users/:id/setting ### 用途:使用者編輯自己的資訊 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body { "account": "user1", "name": "user1", "email": "user1@example.com", "password": "12345678", "checkPassword" : "12345678", "introduction":"hello", "avatar": **Select Files**, "cover": **Select Files** } ### Response Success | code : 200 ``` { "status": "success", "message": "成功編輯使用者資料", "data": { "id": 2, "account": "user1", "name": "user1", "email": "user1@example.com", "avatar": "https://i.imgur.com/sbMwovs.jpeg", "introduction": "hello", "cover": "https://i.imgur.com/gQfIiov.jpeg", "role": "user", "createdAt": "2022-08-03T07:22:25.000Z", "updatedAt": "2022-08-04T02:07:35.579Z" } } ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } 使用者id與params.id不同 code : 500 { "status": "error", "message": "Error: 無法修改其他使用者之資料" } password與checkPassword不同 code : 500 { "status": "error", "message": "Error: Passwords do not match!" } 新輸入的account與他人重複 code : 500 { "status": "error", "message": "Error: account已重複註冊!" } 新輸入的email與他人重複 code : 500 { "status": "error", "message": "Error: email已重複註冊!" } 新輸入的email、account與他人重複 code : 500 { "status": "error", "message": "Error: email已重複註冊!account已重複註冊!" } ``` --- ## GET /api/users/:id/tweets ### 用途:取得一位使用者發的所有推文 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "成功取得使用者的所有推文", "tweets": [ { "id": 12, "description": "Incidunt maiores molestiae deleniti esse nihil facere consequuntur cumque.", "userId": 3, "createdAt": "2022-08-03T07:22:25.000Z", "likesCount": 1, "repliesCount": 3, "isLike": true, "User": { "name": "ihoihhuhuiahoihuhui4", "account": "user2", "avatar": "https://loremflickr.com/320/240/cat/?lock=33.20096626002924" } }, ... ] } ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } 沒有這個user code : 500 { "status": "error", "message": "Error: 使用者不存在" } ``` --- ## GET /api/users/:id/replied_tweets ### 用途:取得一位使用者的所有回覆 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "成功取得使用者的所有的回覆", "replies": [ { "id": 31, "comment": "Quidam quaerat.", "tweetId": 11, "userId": 2, "createdAt": "2022-08-03T02:31:45.000Z", "User": { "id": 2, "account": "user1", "name": "user111", "avatar": "https://loremflickr.com/320/240/cat/?lock=27.494724679506042" }, "Tweet": { "id": 11, "description": "Maxime vasi quam.", "userId": 3, "createdAt": "2022-08-03T02:31:45.000Z", "updatedAt": "2022-08-03T02:31:45.000Z", "UserId": 3, "User": { "id": 3, "account": "user2", "name": "ihoihhuhuiahoihuhui4", "avatar": "https://loremflickr.com/320/240/cat/?lock=24.211826608843424" } } }, ... ] } ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } 沒有這個user code : 500 { "status": "error", "message": "Error: 使用者不存在" } ``` --- ## GET /api/users/:id/likes ### 用途:取得一位使用者喜歡的所有推文 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |user的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "成功取得所有使用者之資料", "likedTweets": [ { "id": 274, "TweetId": 264, "UserId": 64, "createdAt": "2022-08-08T04:30:16.000Z", "Tweet": { "id": 264, "description": "Tenetur aut animi quo adipisci modi soluta reprehenderit.", "UserId": 34, "createdAt": "2022-08-08T03:09:37.000Z", "likesCount": 1, "repliesCount": 3, "isLike": 0, "User": { "id": 34, "account": "user3", "name": "user3", "avatar": "https://loremflickr.com/320/240/cat/?lock=20.35602171804667" } }, "isLike": false, "likesCount": 1, "repliesCount": 3 }, ... ] } 註:最內層的isLike還在思考怎麼修改(1=true,0=fasle),但外層的isLike是正確的,可以先用。 ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } 沒有這個user code : 500 { "status": "error", "message": "Error: 使用者不存在" } ``` --- ## GET /api/users/recommendUsers ### 用途:取得前十位最多人追蹤的使用者 ### Parameters N/A ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "成功取得被追蹤人數前十之使用者資料", "users": [ { "id": 3, "account": "user2", "name": "ihoihhuhuiahoihuhui4", "email": "user22@com", "avatar": "https://loremflickr.com/320/240/cat/?lock=33.20096626002924", "TweetsCount": 9, "LikesCount": 2, "FollowingCount": 2, "FollowerCount": 1, "isFollowing": true },... ] } ``` Failure Response ``` 未使用user帳號登入 code : 401 { "status": "error", "message": "帳號不存在!" } ``` --- # followship 相關 API 文件 ## POST /api/followships ### 用途:新增當前登入使用者的某一筆追蹤 ### Parameters N/A ### Request Body ``` { "id":4 } ``` ### Response Success | code : 200 ``` { "status": "success", "message": "已成功追蹤該名使用者。", "data": { "followerId": 2, "followingId": 4, "updatedAt": "2022-07-30T05:10:42.648Z", "createdAt": "2022-07-30T05:10:42.648Z" } } ``` Failure Response ``` 無法追蹤自己 code : 500 { "status": "error", "message": "Error: 無法追蹤自己" } 追蹤者不存在 code : 500 { "status": "error", "message": "Error: 追蹤者不存在" } 你已經追蹤該名使用者 code : 500 { "status": "error", "message": "Error: 你已經追蹤該名使用者" } ``` --- ## DETELE /api/followships/:followingId ### 用途:刪除當前登入使用者的某一筆追蹤 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | followingId | Required int |following 的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "已成功取消追蹤該使用者", "data": { "followerId": 2, "followingId": 6, "createdAt": "2022-08-03T07:22:25.000Z", "updatedAt": "2022-08-03T07:22:25.000Z" } } ``` Failure Response ``` 尚未追蹤該使用者 code : 500 { "status": "error", "message": "Error: 你尚未追蹤該使用者" } 不存在的使用者 code : 403 { "status": "error", "message": "Error: 無法取消追蹤不存在的使用者" } ``` --- # like 相關 API 文件 ## POST /tweets/:id/like ### 用途:新增當前登入使用者,對某一筆 tweet 的喜歡 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |tweet 的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "您已成功喜歡該則推文", "data": { "id": 14, "UserId": 2, "TweetId": "10", "updatedAt": "2022-07-30T09:33:02.723Z", "createdAt": "2022-07-30T09:33:02.723Z" } } ``` Failure Response ``` 已喜歡過該則推文 code : 500 { "status": "error", "message": "Error: 您已喜歡過該則推文" } 推文不存在 code : 500 { "status": "error", "message": "Error: 無法喜歡不存在的推文" } ``` --- ## POST /tweets/:id/unlike ### 用途:刪除當前登入使用者,對某一筆 tweet 的喜歡 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | id | Required | int |tweet 的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "success", "message": "您已成功取消喜歡該則推文", "data": { "id": 10, "description": "推文內容", "userId": 2, "createdAt": "2022-07-29T15:54:35.000Z", "updatedAt": "2022-07-29T15:54:35.000Z" } } ``` Failure Response ``` 未喜歡過該則推文 code : 500 { "status": "error", "message": "Error: 您未喜歡過該則推文" } 推文不存在 code : 500 { "status": "error", "message": "Error: 沒有該則推文" } ``` --- # reply 相關 API 文件 ## POST /api/tweets/:tweet_id/replies ### 用途:新增當前登入使用者,對某一筆 tweet 的回覆 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | tweet_id | Required | int |tweet 的 id | ### Request Body ``` { "comment": "66666" } ``` ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功回覆該則推文", "data": { "id": 152, "UserId": 2, "TweetId": "6", "comment": "66666", "updatedAt": "2022-08-03T08:57:03.188Z", "createdAt": "2022-08-03T08:57:03.188Z" } } ``` Failure Response ``` 回覆不可空白 code : 500 { "status": "error", "message": "Error: 內容不可空白" } 回覆提交字數過長 code : 500 { "status": "error", "message": "Error: 回覆提交字數過長" } 推文不存在 code : 500 { "status": "error", "message": "Error: 無法回覆不存在的推文" } ``` --- ## GET /api/tweets/:tweet_id/replies ### 用途:某一筆 tweet 的所有回覆 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | tweet_id | Required | int |tweet 的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功!", "data": [ { "id": 112, "comment": "voluptatem", "TweetId": 38, "UserId": 2, "createdAt": "2022-08-02T15:35:47.000Z", "Tweet": { "description": "Quae illo expedita eum nesciunt odit enim quasi.", "User": { "id": 5, "account": "user4" } }, "User": { "name": "user3", "account": "user1", "avatar": "https://loremflickr.com/320/240/cat/?lock=47.65001414542518" } }, ... ] } ``` Failure Response ``` 推文不存在 code : 500 { "status": "error", "message": "Error: 推文不存在" } ``` --- # tweet 相關 API 文件 ## POST /api/tweets ### 用途:新增當前登入使用者的某一筆 tweet ### Parameters N/A ### Request Body ``` { "description": "抹茶好好吃" } ``` ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功推文", "data": { "id": 51, "UserId": 2, "description": "抹茶好好吃", "updatedAt": "2022-07-31T11:16:22.706Z", "createdAt": "2022-07-31T11:16:22.706Z", "userId": 2 } } ``` Failure Response ``` 推文內容不可空白 code : 500 { "status": "error", "message": "Error: 內容不可空白" } 推文內容提交字數過長 code : 500 { "status": "error", "message": "Error: 推文內容提交字數過長" } ``` --- ## GET /api/tweets ### 用途:所有 tweet ### Parameters N/A ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功!", "data": [ { "id": 51, "description": "dfsdsfdsdfsdsfdsfdsd", "UserId": 2, "createdAt": "2022-08-04T12:45:53.000Z", "likeCount": 0, "replyCount": 0, "User": { "name": "user3", "account": "user1", "avatar": "https://loremflickr.com/320/240/cat/?lock=47.65001414542518" }, "isLike": false }, { "id": 2, "description": "Adipisci consequatur similique et ut molestiae nobis suscipit consequuntur doloribus.", "UserId": 2, "createdAt": "2022-08-02T15:35:47.000Z", "likeCount": 0, "replyCount": 3, "User": { "name": "user3", "account": "user1", "avatar": "https://loremflickr.com/320/240/cat/?lock=47.65001414542518" }, "isLike": false },... ] } ``` Failure Response N/A --- ## GET /api/tweets/:tweet_id ### 用途:某一筆 tweet 的所有資訊 ### Parameters | Params | Required | Type |Description | | ----- | -------- | ------|-------- | | tweet_id | Required | int |tweet 的 id | ### Request Body N/A ### Response Success | code : 200 ``` { "status": "Success", "message": "您已成功!", "data": { "id": 64, "description": "Ipsum impedit nisi aut corporis.", "UserId": 14, "createdAt": "2022-08-07T08:21:10.000Z", "likeCount": 0, "replyCount": 3, "User": { "name": "user1", "account": "user1", "avatar": "https://loremflickr.com/320/240/cat/?lock=11.248270732417986" }, "isLike": false }, "replies": [ { "id": 184, "comment": "sint", "UserId": 34, "createdAt": "2022-08-07T08:21:10.000Z", "User": { "name": "user3", "account": "user3", "avatar": "https://loremflickr.com/320/240/cat/?lock=16.470612472551082" } }, { "id": 194, "comment": "Voluptas nisi sed fugiat odio qui recusandae quam et.", "UserId": 54, "createdAt": "2022-08-07T08:21:10.000Z", "User": { "name": "user5", "account": "user5", "avatar": "https://loremflickr.com/320/240/cat/?lock=2.0225684327625615" } }, ... ] } ``` Failure Response ``` 推文不存在 code : 500 { "status": "error", "message": "Error: 沒有該則推文" } ``` ---

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully