# 2022 JS直播班 第21 22組-第八週作業討論 ###### tags: `2022 JS直播班` `六角` [TOC] ## 組員參與名單 :::success 固定讀書會時間:每週一晚上8點~9點 ::: - [x] RyanTsai#8906 - [x] 阿蘇#8531 - [ ] Dingy#2931 - [ ] YU#0618 - [ ] JackC#0411 - [x] Yorkshi#9337 - [x] YC#2522 - [x] pidder#7315 - [x] IreneY#0086 - [x] 威0#6919 - [x] 我是泇吟#5189 - [x] 艾芮絲#6060 - [x] 嗶嗶羊#8042 - [ ] Velma#1693 - [x] Clara#1275 - [x] 心幻羽#0056 - [x] Sentiments#4883 - [ ] sophiee#7015 ## 固定讀書會會議內容 :::warning 一、第八週小組討論 二、第七週邏輯題 ::: :::success 會議記錄 一、第八週小組討論 1: 什麼是RESTful API A: **Sentiments**,restful 规范采用同样的命名但是方法不一样,你发现老师提供的 api 全部网址都是一样的,只是它的方法不一样而已。 2: [自學RESTful API ](https://hackmd.io/@monkenWu/Sk9Q5VoV4/https%3A%2F%2Fhackmd.io%2F%40gen6UjQISdy0QDN62cYPYQ%2FHJh9zOE7V?type=book) 3: PATCH、PUT 差異? A: 一個是修改、一個是取代 二、第七週邏輯題 第10題:[【 JavaScript 】JavaScript 費氏數列的 3 種解法](https://jimmyswebnote.com/javascript-fibonacci-numbers/) ::: ## 小組討論 [六角學院 API 申請平台](https://livejs-api.hexschool.io/) ## 第一題 最終關卡討論 請討論 API 該如何與整合前端 [XD 設計稿](https://xd.adobe.com/view/a48b8617-4588-4817-9062-b62130dce916-f1d8/) ### 問題一:初始化,取得產品與購物車列表 * [取得產品列表(Get):/api/livejs/v1/customer/{api_path}/products](https://hexschool.github.io/hexschoolliveswagger/#/%E7%94%A2%E5%93%81%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/get_api_livejs_v1_customer__api_path__products) * [取得購物車列表(Get)::/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/get_api_livejs_v1_customer__api_path__carts) ``` //取得產品列表(Get):/api/livejs/v1/customer/{api_path}/products { "status": true, "products": [ { "category": "產品分類 (String)", "image": "產品圖片 (String)", "id": "產品ID (String)", "title": "產品名稱 (String)", "origin_price": "產品原始價錢 (Number)", "price": "產品銷售價錢 (Number)" } ] } ``` >新帳號預設購物車會有一筆資料 | Discord 暱稱 | 連結 | | -------- | -------- | ||| ### 問題二:新增購物車品項,並再次初始化購物車列表 * [加入購物車(POST):/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/post_api_livejs_v1_customer__api_path__carts) | Discord 暱稱 | 連結 | | -------- | -------- | ||| ### 問題三:修改購物車狀態(刪除全部、刪除單筆),並再次初始化購物車列表 * [清除購物車內全部產品(DELETE):/api/livejs/v1/customer/{api_path}/carts](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/delete_api_livejs_v1_customer__api_path__carts) * [刪除購物車內特定產品(DELETE):/api/livejs/v1/customer/{api_path}/carts/{id}](https://hexschool.github.io/hexschoolliveswagger/#/%E8%B3%BC%E7%89%A9%E8%BB%8A%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/delete_api_livejs_v1_customer__api_path__carts__id_) | Discord 暱稱 | 連結 | | -------- | -------- | ||| ### 問題四:送出購買訂單,並再次初始化購物車列表 * [送出購買訂單(POST):/api/livejs/v1/customer/{api_path}/orders](https://hexschool.github.io/hexschoolliveswagger/#/%E8%A8%82%E5%96%AE%E7%9B%B8%E9%97%9C(%E5%AE%A2%E6%88%B6)/post_api_livejs_v1_customer__api_path__orders) | Discord 暱稱 | 連結 | | -------- | -------- | ||| ### 問題五:觀看後台訂單 * [取得訂單列表(GET):/api/livejs/v1/admin/{api_path}/orders](https://hexschool.github.io/hexschoolliveswagger/#/%E8%A8%82%E5%96%AE%E7%9B%B8%E9%97%9C(%E7%AE%A1%E7%90%86%E8%80%85)/get_api_livejs_v1_admin__api_path__orders) * [Codepen 範例](https://codepen.io/hexschool/pen/yLgaBWV?editors=1010) | Discord 暱稱 | 連結 | | -------- | -------- | ||| --- ## 討論截圖  
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.