App 開發筆記-接上api這件事情

將主管的指令翻譯成白話文

做APP從網路抓資料是一件 恩….每天發生的事情,所以要學XD。

“接上api”這一句話其實是蠻大的工程,最重要的是溝通,請多和隊友溝通。

  1. 首先,理解商業邏輯

商業邏輯會影響到資料的結構設計,如果你公司有後端會製造api,那事前溝通就格外重要。像是本次幼稚園專案使用代理帳號的方式,代表你抓下來的資料primary key 要由至少兩個值構成,像是user_id(家長、老師、小孩) 搭配上體溫_id。

2. 建立資料結構

按照api的資料結構,做出對應的Model

3.存在本地端Local的資料庫

4. 連線

填上Header RESRful方法,parameter……

5. 在生命週期中加入程式碼

6. 最後用log 還有 PostMan 驗證

終於完成了~~ IT人今天也加油

--

--

Major in physical education. Football referee. And high interest in looking the world through the numbers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.