Lotteries.io Draws

Named Draw Series

A Draw Series is a named series of Draws. The Canonical Name of a Draw Series may be the same as a Gaming Product based around it - but they are not the same thing.

A resource representing a Draw Series should include:

For example:

{
  "_links" : {
    "curies": [
      {
        "name": "lo",
	      "href": "http://www.lotteries.io/link-relationships/{link-relationship}",
	      "templated": true
      }
     ],
     "lo:draw-organiser": {
        "href": "http://www.operator.com/organisations/self"
     },
     "lo:current-draw-scheme": {
       "href": "http://www.operator.com/draw-series/series1/scheme1"
     },
     "lo:draws" : {
     	"href": "http://www.operator.com/draw-series/series1/draws{?fromDate,toDate}",
     	"templated": true
     },
     "self": {
       "href": "http://www.operator.com/draw-series/series1"
     }
   },
   "canonical-name": "series1"
}

Draw Schedule

Draw Schedules define the schedule for Draws in a Draw Series - in other words, a method of determining when future Draws will take place so that Participation Pools can be created and opened in a timely fashion.

The draw schedule may change over time in accordance with the needs of the Draw Organiser. The exact form must be defined by the operator application profile so that the expressions can be interpreted.

Representation forms such as cron expressions or iCalendar (via jCal are conceivable).

A resource that describes part or all of a list of draws available for a Draw Series lists these sorted on draw time, earlier draws being listed before later ones. The resources may be paged, in which case the standard next and prev link relationships from the IANA Assigned LInk Relationships are used to move within the collections.

Such a resource is essentially a list of draw links to resources describing individual draws. We enhance the links with the draw-time property for better ease of use. For example:

{
   "_links":{
      "curies":[
         {
            "name":"lo",
            "href":"http://www.lotteries.io/link-relationships/{link-relationship}",
            "templated":true
         }
      ],
      "lo:draw":[
         {
            "href":"http://www.operator.com/draw-series/series1/draws/45678",
            "draw-time":"2015-02-23T12:00:00Z"
         },
         {
            "href":"http://www.operator.com/draw-series/series1/draws/45677",
            "draw-time":"2015-02-22T125:00:00Z"
         }
      ],
      "next":{
         "href":"http://www.operator.com/draw-series/series1/draws?page=3"
      },
      "prev":{
         "href":"http://www.operator.com/draw-series/series1/draws?page=1"
      },
      "lo:draw-series":{
         "href":"http://www.operator.com/draw-series/series1"
      },
      "self":{
         "href":"http://www.operator.com/draw-series/series1/draws?page=2"
      }
   },
}

Discovering information about Individual Draws

Draw resources give information about a Draw - and, quite intentionally, no data about the Participation Pools that are organised around their outcome by Operators in the form of Gaming Products.

Note that this means that, in theory at least, an arbitrary number of Gaming Products can be defined by an arbitrary number of Operators around the outcome of a single Draw Series.

A resource describing a draw should include at least:

For example:

{
  "_links": {
    "curies": [
      {
        "name": "lo",
	      "href": "http://www.lotteries.io/link-relationships/{link-relationship}",
	      "templated": true
      }
     ],
     "lo:draw-organiser": {
        "href": "http://www.operator.com/organisations/self"
     },
     "lo:draw-scheme": {
       "href": "http://www.operator.com/draws/series1/scheme1"
     },
     "lo:draw-series": {
        "href": "http://www.operator.com/draws/series1"
      }
     "self": {
        "href": "http://www.operator.com/draws/series1/123456"
     }
   },
   "draw-time": "2015-02-26T18:00:00Z",
   "draw-outcome": {
     "numbers": [1, 2, 3, 4, 5, 6]
   }
}