๐ŸŽฏ ืžื˜ืจื”

ืœืฉื—ื–ืจ ื‘ื“ื™ื•ืง ื›ืœ request ืžื”ึพPostman ื‘ืงื•ื“ Python.


๐Ÿง  ืื™ืš ืขื•ื‘ื“ื™ื (ืงืจื™ื˜ื™)

ืœื›ืœ ืฉื•ืจื” ื‘ื˜ื‘ืœื”:

  1. ืคื•ืชื—ื™ื ืืช ื”ึพrequest ื‘ึพPostman
  2. ืžื–ื”ื™ื:
  3. ื›ื•ืชื‘ื™ื ืงื•ื“ requests ืชื•ืื
  4. ืžื“ืคื™ืกื™ื ืชื•ืฆืื” ืœืคื™ ื”ื“ืจื™ืฉื”

๐Ÿ“ฆ ื—ืœืง 1 โ€” POSTS

# ืฉื ื”ืคืขื•ืœื” ืžื” ืœืงื—ืช ืžื”ึพPostman ืžื” ืœื›ืชื•ื‘ ื‘ืงื•ื“ ืžื” ืœื”ื“ืคื™ืก
1 Get All Posts GET + URL requests.get() status + len()
2 Get Post by ID URL ืขื ID GET ืขื path param ื›ืœ ื”ึพJSON
3 Get Posts by User query param userId ืฉื™ืžื•ืฉ ื‘ึพparams ืจืง titles
4 Create Post POST + JSON body + header requests.post(json=...) status + response
5 Update Post (PUT) PUT + body ืžืœื requests.put() response ืžืœื
6 Patch Post PATCH + ืฉื“ื” ืื—ื“ requests.patch() ืจืง title
7 Delete Post DELETE requests.delete() status ื‘ืœื‘ื“
8 Get Comments for Post nested URL GET ืจืง emails

๐Ÿ“ฆ ื—ืœืง 2 โ€” COMMENTS

# ืคืขื•ืœื” ืžื” ืœื–ื”ื•ืช ื“ืจื™ืฉืช ืงื•ื“ ืคืœื˜
1 Get All GET ืจื’ื™ืœ count
2 Get by ID path param GET JSON
3 Filter by Post query param params emails
4 Create POST + body json= response
5 Delete DELETE ืจื’ื™ืœ status

๐Ÿ“ฆ ื—ืœืง 3 โ€” ALBUMS

# ืคืขื•ืœื” ื“ื’ืฉ ื—ืฉื•ื‘ ื“ืจื™ืฉืช ืงื•ื“ ืคืœื˜
1 Get All GET ืจื’ื™ืœ count
2 Get by ID path param GET JSON
3 Get Photos nested resource GET titles
4 Create POST json= response
5 Delete DELETE ืจื’ื™ืœ status

๐Ÿ“ฆ ื—ืœืง 4 โ€” PHOTOS