You are reading a single comment by @Velocio and its replies. Click here to read the full conversation.
  • And if you looked at:
    [code]
    http://home.buro9.com/api/v1/
    [/code]

    You'd notice that 'comments' are now mocked on too.

    Flow...

    To render the home page of LFGSS you'd probably need to make 3 calls:
    [code]
    http://home.buro9.com/api/v1/site
    http://home.buro9.com/api/v1/whoami
    http://home.buro9.com/api/v1/notifications
    http://home.buro9.com/api/v1/microcosms
    [/code]

    The first three do the following, you'd call them on every "page" of the web site, far less frequently for mobile clients:
    site = returns high level info about the site including the site title and stats
    whoami = returns basic user info for the logged in person, username and avatar
    notifications = returns a list of notifications, date descending, indicating unread notifications

    The only thing of interest is the call to:
    microcosms = the forums that exist on this site

    Assuming the user now navigated into a microcosm:
    To render a microcosm (forum) listing you'd call the big 3 (site, whoami, notifications) and then:
    [code]
    http://home.buro9.com/api/v1/microcosms/1
    [/code]

    That will now return a list of all items (events, conversations, polls, etc) within that microcosm.

    Assuming that an event was now clicked on the next page calls the big 3 and then:
    [code]
    http://home.buro9.com/api/v1/events/1
    [/code]

    This contains info on the event (what, where, when, how long, etc) as well as an array of comments (posts in vBulletin language) associated with the event.

    The comments are all represented right now as ESI statements... that means Edge Side Include: [ame]http://en.wikipedia.org/wiki/Edge_Side_Includes[/ame]

    Where it says:
    [code]
    "esi": "/comments/1"
    [/code]

    You will get the whole document that is at http://home.buro9.com/api/v1/comments/1 merged in-line inside the event document.

    Which means a single call to the event detail would render all info for a whole page of the event thread including all of the event information and status.

    Pagination params on the event ?limit=25&offset=50 now allow you to navigate through the comments on the event.

    That's the flow... but it's all mocked right now, and I'll write some documentation very soon.

About

Avatar for Velocio @Velocio started