Closed PorterHoskins closed 7 years ago
@dodgertodd @kingbrendann what do you guys think about this?
Updated it with product and Accept-Language
Updated with index on the Feed Item model
I think I'd change Product
into Listing
. The Product
model is going to be pretty key in the store. I think Listing
has a Product
. And a Product
inheriting, for instance, index
from FeedItem
seems odd.
I'm writing a RAML spec for this right now. It'll produce docs for us, run validations against schemas, can auto-generate test endpoints, and even skeleton endpoint code. It's pretty rad. Contracts ftw.
👍 agreed
Another thing...should I pick on feed
and feedItem
? Isn't the convention that a collection resource should be the pluralized version of the type of items in the collection? So it should be feedItems
? Worth it?
Another thing...should I pick on feed and feedItem ? Isn't the convention that a collection resource should be the pluralized version of the type of items in the collection? So it should be feedItems ? Worth it?
Are you saying the GET /feed
should be GET /feedItems
? That works for me.
@dodgertodd we need to add type
to the feed item so the parsers can know what it is. Added to the spec.
@dodgertodd Can you add it to the RAML?
We might want to add an optional query argument to the feed endpoint someday to pass a list of types if we want to support filtering.
The event object should have a link to the Eventbrite page. They use that for ticketing and stuff.
Let's close this.
The server should return a list of feed items for the user to browse through.
Feed Item Types
Endpoint Spec:
GET /feed
Query Arguments:
count
: number of items the server should return (Optional)index
: the place where the server should start when fetching the feed items (Optional)Headers
Accept-Language
: The language the application is running in. Titles, descriptions, and any other user facing string should come down from the server translated in that language.Feed Item Model
identifier
: The unique identifier of the item String / GUIDtype
: The unique identifier of the item (video
,event
,listing
) Stringtitle
: The title / name of the item Stringdescription
: The description of the content in the item Stringindex
: The position of the item in the feed. Used for sorting and paging. IntegerisActive
: Flag to display the item or notVideo Data Model
Inherits from Feed Item
previewImageURL
: The url to the image for the frame of the video to show as a preview StringvideoURL
: The url to the video stream StringpublishDate
: The date the video was published Stringviews
: The number of times the video was viewed IntegerEvent Data Model
Inherits from Feed Item
coordinates
: The GPS coordinates to the event to show on the map Stringaddress
: The street address of the location StringinviteURL
: The link to the event on EventbriteListing Data Model
Inherits from Feed Item
price
: The price of the product in USD FloatpreviewImageURL
: The url to the image for the product to show as a preview String