WEBVTT
Kind: captions
Language: en

00:00:00.030 --> 00:00:07.670
In this section we're going to build an
API to handle user profile feed items

00:00:07.670 --> 00:00:13.769
let's start by describing the basic
features our API requires our feed API

00:00:13.769 --> 00:00:18.630
is going to need to handle the following
creating new feed items for

00:00:18.630 --> 00:00:24.750
authenticated users updating an existing
feed item in case the user makes a typo

00:00:24.750 --> 00:00:29.460
or wants to change the content of a feed
item they've already posted deleting an

00:00:29.460 --> 00:00:37.140
item and viewing other users feed items
so what URLs might our API provide well

00:00:37.140 --> 00:00:43.500
first and foremost we're going to need a
route API to list all the feed items in

00:00:43.500 --> 00:00:49.410
the database this will be the forward
slash API forward slash feed endpoint

00:00:49.410 --> 00:00:56.489
and we'll support two HTTP methods HTTP get for getting a list of all user

00:00:56.489 --> 00:01:02.010
feed items and HTTP post for
creating a new feed item for the

00:01:02.010 --> 00:01:09.960
authenticated profile second we will
need a feed item detail API which is the

00:01:09.960 --> 00:01:17.660
forward slash API slash feed URL with a
specific feed item ID after it

00:01:17.660 --> 00:01:23.640
this will support the following methods HTTP GET
for getting the details of a specific

00:01:23.640 --> 00:01:31.530
feed item this is known as the detail
view HTTP put and HTTP patch for

00:01:31.530 --> 00:01:37.979
updating a feed item and finally HTTP
delete for... you guessed it, deleting

00:01:37.979 --> 00:01:40.140
the feed item

00:01:40.140 --> 00:01:44.549
so that is what our API
should look like let's get started and

00:01:44.549 --> 00:01:47.450
build our API

