UTD-CRSS / exploreapollo-api

API server for the exploreapollo.org application
7 stars 4 forks source link

API Routes for Story Viewer - Front end <=> API Server #8

Closed VictorK1902 closed 8 years ago

VictorK1902 commented 8 years ago

So far I only see one api route needed for the Story Viewer which is the one below to provide metadata of a given story

Any update will be reflected here later

I. Story

Front-end simply provide the storyID while accessing the following route and should get the following response

  1. Front-end

    api/story?storyID=%s
  2. API server

    Return story metadata and all moments metadata in order

    {
       "message"         : string,
       "id"              : int,
       "title"           : string,
       "description"     : string,  
       "momentList"      : [
           {
               "id"            : int,
               "title"         : string,
               "order"         : int,
               "met_start"     : string,
               "met_end"       : string,
               "description"   : "abcdxyz"
           },
           ...
       ]
    }

    Expected messages return for each api call: "Success", "Error connecting to database", "Empty storyID. Please try again", "Incorrect storyID. Please try again".

  3. Sample API call and response:

    Imgur

  4. Questions??
JamieCrisman commented 8 years ago

Do we want to include mission information into this call? particularly on the story pages we'll need to have it for the visual timeline so we can correctly place the moments.

VictorK1902 commented 8 years ago

Would that info be best fit in the mission overview where you have a list of story and little description of each story?