paulschneider / b247-api

0 stars 0 forks source link

Multi event listings #62

Closed paulschneider closed 10 years ago

paulschneider commented 10 years ago

Hey Pablo,

So I've been working on the multi date listings. These being events that have more than one occurrence (what I've called a performance in the code) that could be spread out over a period of time.

What this ultimately comes down to is that we are able to show a from and to range of dates where there are multiple instances of a performance, reference this part of the wireframe:

screen_shot_2014-08-07_at_09_56_30

Up until now I have only been able to provide you with a show start date and time and price for a single point in time. Now I have re-worked events to produce a list of performances for a particular event and a summary of the range of those dates. Example (draft) JSON for an event object looks like this:

"event": {
                            "details": {
                                "id": 17,
                                "title": "Hippodrome Choir Concert",
                                "sefName": "hippodrome-choir-concert",
                                "showDate": "2014-08-07",
                                "showTime": "18:30",
                                "price": "10.00",
                                "url": "http://www.atgtickets.com/shows/hippodrome-choir-concert/bristol-hippodrome/",
                                "performances": {
                                    "summary": {
                                        "firstPerformance": {
                                            "start": "2014-08-07",
                                            "time": "18:30",
                                            "epoch": 1407432600,
                                            "price": "10.00"
                                        },
                                        "nextPerformance": {
                                            "start": "2014-08-07",
                                            "time": "18:30",
                                            "epoch": 1407432600,
                                            "price": "10.00"
                                        },
                                        "lastPerformance": {
                                            "start": "2014-08-08",
                                            "time": "19:30",
                                            "epoch": 1407522600,
                                            "price": "10.00"
                                        }
                                    },
                                    "times": [
                                        {
                                            "start": {
                                                "epoch": 1404671400,
                                                "readable": "06-07-2014 19:30",
                                                "day": "2014-07-06",
                                                "time": "19:30"
                                            },
                                            "end": {
                                                "epoch": 1404675000,
                                                "readable": "06-07-2014 20:30",
                                                "day": "2014-07-06",
                                                "time": "20:30"
                                            },
                                            "price": "10.00"
                                        },
                                        {
                                            "start": {
                                                "epoch": 1407351600,
                                                "readable": "06-08-2014 20:00",
                                                "day": "2014-08-06",
                                                "time": "20:00"
                                            },
                                            "end": {
                                                "epoch": 1407355200,
                                                "readable": "06-08-2014 21:00",
                                                "day": "2014-08-06",
                                                "time": "21:00"
                                            },
                                            "price": "10.00"
                                        }
                            }
                  }

You still have access to all the same information you had previously but I now (obviously) include a summary and list of performances which support the wire frames and designs. Im not sure this affects you as I cant see that the date ranges are used anywhere but within the HTML I send through to you for the HTML templates. Worth checking the designs though, I don't have them so not sure.

I'll deploy onto staging now for you to take a look at when you have time.

P

benvium commented 10 years ago

Thanks Paul. Pablo and I believe that this is an addition, and shouldn't break anything in the app. Can you confirm if the code is now deployed to staging?

paulschneider commented 10 years ago

I actually meant cycle when I mentioned staging above. However its not on either as Ive realised I need to return the middle date in a list of several events to accurately show listings. Just finishing this off now and I'll deploy to cycle.

I'll leave staging as it is until Kevin signs off.

paulschneider commented 10 years ago

These updates are now on the cycle server