More2Life API documentation
https://m2l-server.herokuapp.com/api
Feed
Get a feed of content
get /feedItems
Headers
- Accept-Language: required (string)
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.
Query Parameters
- count: (integer)
- index: (integer)
- type: (one of video, event, listing)
Used to request feed items of only one type
- isActive: (boolean)
Active feedItems should be shown in the app.
HTTP status code 200
Body
Media type: application/json
Type: array of FeedItem
Items: FeedItem
- _id: required (string)
The unique identifier of the item
- title: required (string)
The title / name of the item
- description: required (string)
The description of the content in the item
- index: required (integer)
The position of the item in the feed. Used for sorting and paging
- type: required (one of video, event, listing)
- isActive: required (boolean)
Should be displayed in the Feed
Example:
[
{
"_id" : "video1",
"type" : "video",
"isActive" : true,
"title" : "Video One",
"description" : "The first FeedItem, which is a video",
"index" : 0,
"previewImageUrl" : "http://vignette4.wikia.nocookie.net/byufootball/images/c/cb/Jonny-harline.jpg/revision/latest?cb=20120215040008",
"videoUrl" : "https://www.youtube.com/watch?v=RnJbeswDpVg",
"publishDate" : "2006",
"views" : 1000000000
},
{
"_id" : "event1",
"type" : "event",
"isActive" : true,
"title" : "Event One",
"description" : "The first FeedItem, which is an event",
"index" : 1,
"address" : "7314 E Minton Cir, Mesa, AZ 85207",
"area" : "Mesa, AZ",
"multiLineAddress" : [
"7314 E Minton Cir",
"Mesa, AZ 85207"
],
"latitude" : "33.5609",
"longitude" : "-111.6734",
"venueName" : "Todd's House",
"eventUrl" : "https://www.eventbrite.com/e/test-event-registration-36694259518",
"resourceUri" : "https://www.eventbriteapi.com/v3/events/36694259518/",
"imageUrl" : "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F33801220%2F216775133792%2F1%2Foriginal.jpg?s=3cfc1ec1828b790b438cd649fb9161fb",
"startTime" : "2017-09-10T19:00:00",
"endTime" : "2017-09-10T22:00:00"
},
{
"_id" : "listing1",
"type" : "listing",
"isActive" : true,
"title" : "Listing One",
"description" : "This rad M2L shirt",
"index" : 2,
"previewImageUrl" : "https://static1.squarespace.com/static/589cd8763a04119f4ac96b94/5935c61303596eebfc69fb24/5935c85fa5790a30526cd72b/1496701404713/17FTB+More2Life+Harlem+1226.CR2.jpg",
"vendorId" : "AD3456GDKH2",
"lastUpdatedAt" : "2017-08-10T17:15:05.589Z",
"price" : "25.00"
},
{
"_id" : "event2",
"type" : "event",
"isActive" : false,
"title" : "Inactive Event",
"description" : "This event is not active. Someone send over the missionaries.",
"index" : 3,
"address" : "602 N May, Unit 96, Mesa, AZ 85201",
"area" : "Mesa, AZ",
"multiLineAddress" : [
"602 N May",
"Unit 96",
"Mesa, AZ 85201"
],
"latitude" : "33.425861",
"longitude" : "-111.8816297",
"venueName" : "Todd's Old House",
"eventUrl" : "https://www.eventbrite.com/e/kalani-sitake-more2life-foundation-luncheon-tickets-35192924986#",
"resourceUri" : "https://www.eventbriteapi.com/v3/events/35192924986/",
"imageUrl" : "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F33801220%2F216775133792%2F1%2Foriginal.jpg?s=3cfc1ec1828b790b438cd649fb9161fb",
"startTime" : "2017-09-10T19:00:00",
"endTime" : "2017-09-10T22:00:00"
}
]
/webhooks/eventbrite
POST an event.created webhook from Eventbrite. Eventbrite docs Configure here
post /webhooks/eventbrite/create
Body
Media type: application/json
Type: object
Properties- api_url: required (string)
URL for the updated resource
- config: required (object)
- action: required (string)
Name of the event that occured on Eventbrite
- endpoint_url: required (string)
The URL to which Eventbrite will POST the hook body
- user_id: required (string)
- webhook_id: required (string)
- action: required (string)
Example:
{
"api_url": "https://www.eventbriteapi.com/{api-endpoint-to-fetch-object-details}/",
"config": {
"action": "test",
"endpoint_url": "https://m2l-server-pr-39.herokuapp.com/api/webhooks/eventbrite/update",
"user_id": "216775133792",
"webhook_id": "455763"
}
}
POST an event.updated webhook from Eventbrite. Eventbrite docs Configure here
post /webhooks/eventbrite/update
Body
Media type: application/json
Type: object
Properties- api_url: required (string)
URL for the updated resource
- config: required (object)
- action: required (string)
Name of the event that occured on Eventbrite
- endpoint_url: required (string)
The URL to which Eventbrite will POST the hook body
- user_id: required (string)
- webhook_id: required (string)
- action: required (string)
Example:
{
"api_url": "https://www.eventbriteapi.com/{api-endpoint-to-fetch-object-details}/",
"config": {
"action": "test",
"endpoint_url": "https://m2l-server-pr-39.herokuapp.com/api/webhooks/eventbrite/update",
"user_id": "216775133792",
"webhook_id": "455763"
}
}