Ready to Learn?Ex Libris products all provide open APIs

Tech Blog

 

Event Registration

This project can be used to allow users to check themselves into events (sports games, orientation, concerts, etc.). This tile could also be used with iBeacons to provide location based services.

Walkthrough: 

When a user opens the tile, they will be prompted to share their location information. Once they agree to share this information, they will see the home screen. This screen will display some of their user information. They must fill in their first name, last name, and a keyword for the event. Note, if LDAP is being used with the campusM app, the user's first and last name should be able to be preloaded as well. After they have filled in this information, they will click the "save" icon. They will then be able to click "Register." This action will record their attendance for the event. There is also a "history" icon, where the user can see all of the times that they have ever registered.  

Screenshots:

                            

 

Setup:

Clone the repository from GitHub, found here. Navigate into the root of the "event-registration" folder in your terminal. Run "aek login" in the terminal. Run "npm install." Finally, run "aek start" and make sure that you can see your project running on localhost:5000 from within the browser. Additionally, open up the project in your preferred editor. 

To be able to record registrations and to display the history of the user's registrations, you must include endpoints for the GET/POST requests. You can configure these endpoints in the main.ect file. Please note that the project will not fully work until you have provided these endpoints (the history page will not load and clicking "Register" will not successfully submit anything). 

GET Request: 

When you go into the main.ect file, you will see the following: {% set service = aek.create_service("https://fakeserver.com?user=" ~ aek.campusm_user_email()) %}. This code is telling the project to make a GET request to "https://fakeserver.com" with a query for the current user's email address. The endpoint is fake and will not work. Once configured with a working endpoint, this action should return all submissions (or registrations) made by the current user. It will be helpful to use the same attributes as was used for this initial project. The following is a sample response to a GET request for all the submissions from the user with "testuser@gmail.com" as an email. You can ignore the 3 ibeacon attributes. 

 

POST Request: 

Once the POST request is configured, the request will send the following parameters to be recorded: latitude, longitude, platform, user, recorded_timestamp, first, last, and keyword. All these values will be collected before the user is able to click "Register."