Abstract service flows with Eventbrite events implementation
ServiceFlows inherit from ServiceFlow. They are registered in the ServiceFlowRegistry. A ServiceFlowWorker exists that merely gets the service by id, instantiates a ServiceFlow with the given flow, then calls its get_data method.
To test:
You will first need to create an Eventbrite account and also create an event.
-
reset the database
bundle exec rails db:reset
-
login with the created user and use their authorization header
-
visit http://localhost:3001/api/auth/eventbrite?user_id=1&serviceable_type=space&serviceable_id=1
-
agree to give JOGL access and you will be redirected to http://localhost:3000
-
GET /api/services/1 to verify that a service was created
-
PUT /api/services/1/flows/events should return a 201 and
ServiceFlowData.count
should now be 1 -
GET /api/services/1/flows/events should return service flow data
-
POST /api/services/1/flows/events should return a 201 and
Activity.count
should now be 1 -
GET /api/spaces/1/activities returns activities and the first one matches the information from your Eventbrite event
Closes https://gitlab.com/JOGL/JOGL/-/issues/906
Other routes you can check-out:
GET /api/services/1/flows returns all the flows available for that service