More2Life / m2l-server

More2Life App Server
https://m2l-server.herokuapp.com
2 stars 0 forks source link

Return a list of feed items #12

Closed PorterHoskins closed 7 years ago

PorterHoskins commented 7 years ago

The server should return a list of feed items for the user to browse through.

Feed Item Types

Endpoint Spec:

GET /feed

Query Arguments:
Headers

Feed Item Model

Video Data Model

Inherits from Feed Item

Event Data Model

Inherits from Feed Item

Listing Data Model

Inherits from Feed Item

PorterHoskins commented 7 years ago

@dodgertodd @kingbrendann what do you guys think about this?

PorterHoskins commented 7 years ago

Updated it with product and Accept-Language

PorterHoskins commented 7 years ago

Updated with index on the Feed Item model

dodgertodd commented 7 years ago

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.

dodgertodd commented 7 years ago

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.

M2LDev commented 7 years ago

👍 agreed

dodgertodd commented 7 years ago

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?

PorterHoskins commented 7 years ago

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.

PorterHoskins commented 7 years ago

@dodgertodd we need to add type to the feed item so the parsers can know what it is. Added to the spec.

PorterHoskins commented 7 years ago

@dodgertodd Can you add it to the RAML?

PorterHoskins commented 7 years ago

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.

kingbrendann commented 7 years ago

The event object should have a link to the Eventbrite page. They use that for ticketing and stuff.

kingbrendann commented 7 years ago

Let's close this.