Sedan 2016.4203:

För att få passagetries ut på websocket behöver "sendPassageTriesOverWebSocket" slås på.

För att få ut bilder tillsammans med passagetries (eg endast aktuellt för inpasseringsdisplayen) behöver även "sendPassageTryPicturesOverWebSocket" slås på.

TÄNK på att alla workouts på alla anläggningar kommer ut på websocketen oavsett om någon lyssnar eller inte. DVS hos tex Nordic Wellness eller F24S kommer väldigt mycket data att laddas i onödan.

Om den som implementerar är riktigt värdelös så kan vi skicka dem denna exempelkod. Jag vill inte lägga den publikt då random snubbe skulle kunna använda den. (Anders 2016-11-15) 

Ligger som attachment här http://dok.brpsystems.se/confluence/pages/viewpageattachments.action?pageId=3

Requirement

Protocol

Authentication

At the moment no authentication is required.

Connection

Connect websocket to BRPGOG_BASE_URL/stomp/websocket or and send:

 

CONNECT\n\n^@

 

Messages to subscribe to

WorkOut message

WorkOut message is sent each time a person is registered for a work out.

SUBSCRIBE
id:any_client_id
destination:/topic/workout/record\n\n^@ 
MESSAGE 
content-type:application/json;charset=UTF-8 
subscription:any_client_id 
destination:/topic/workout/record 
 
{
  "workout": {
    "id" : 4711,
    "person_id": 1234,
    "activity_id" : null,
    "product_id" : null,
    "product_name" : null,
    "businessunit_id" : 160,
    "businessunit_name": "Our training center",
    "date" : "2016-02-18T07:44:56.151Z"
  }
}
 
\n\n^@ 

Value

Format

Description

id

Number

Id of WorkOut

person_id

Number

Id of Person

activity_id

Number or Null

Id of Activity. Will only be set if the WorkOut is connected to a GroupActivity booking.

product_id

Number or Null

Id of Product. Will only be set if the WorkOut is connected to a GroupActivity booking.

product_name

String or Null

Name of Product. Will only be set if the WorkOut is connected to a GroupActivity booking.

businessunit_idNumberId of business unit
businessunit_nameStringName of business unit

date

YYYY-MM-DDThh:mm:ss.sssZ

Date and time of the WorkOut. In UTC time zone.

Booked From Waitinglist message

The BookedFromWaitinglist message is sent when a customer is moved from the waiting list of a group activity and gets properly booked.

SUBSCRIBE
id:any_client_id
destination:/topic/bookedfromwaitinglist\n\n^@
MESSAGE 
content-type:application/json;charset=UTF-8 
subscription:any_client_id 
destination:/topic/bookedfromwaitinglist
 
{
  "groupactivitybooking": {
    "id" : 4711,
    "start" : "2016-02-18T07:44:56.151Z",
    "caption" : "Zumba",
    "activity_id" : 325,
    "person_id": 1234,
    "businessunit_id" : 160,
    "businessunit_name": "Our training center"
  }
}\n\n^@ 

Value

Format

Description

id

Number

Id of GroupActivityBooking (The customers booking at the group activity)

person_id

Number

Id of Person

activity_id

Number or Null

Id of the group activity instance

caption

String

Name of Product. .

businessunit_idNumberId of business unit
businessunit_nameStringName of business unit

start

YYYY-MM-DDThh:mm:ss.sssZ

Date and time of the group activity. In UTC time zone.