Skip to content
Thomas Gaubert edited this page Oct 2, 2016 · 2 revisions

Notifications

Notifications are sent via Firebase as a data payload with the following structure:

POST https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=SERVER_KEY
{
  "to": "/topics/<topic>",
  "time_to_live": 0, 
  "data": {
    "title": "HackTX",
    "text": "New Notification",
    "vibrate": "false"
   }
}
  • topic - FCM topic to broadcast notification to. The Android app is registered on the following topics:
    • hacktx
    • android
    • announcements
    • debug - only when in debug mode
  • title - Title of the notification. Defaults to “HackTX”.
  • text - Notification body. Defaults to “New Notification”
  • vibrate - Whether or not to vibrate upon receiving the notification. Defaults to false.

Each FCM topic has its own notification ID, meaning that one of each notification will show up. Subsequent messages of a similar topic will override the older notification. If bundled notifications are enabled, notifications are bundled together in a groups of five by ID (Android N+).

API Endpoints

For examples of each, see the mocks.

Partners

The partners endpoint should return a JSON array with the following:

  • Partner
    • name - name of partner
    • logoImage - URL to partner logo
    • website - URL to partner website
    • level - partnership tier

Schedule

The each day of the schedule is represented by a separate JSON file.

A single day (JSON file) is made up of the following items in an array:

  • Section - grouping of events by start time, etc.
    • id - unique, ordered identifier for a Section
    • name - name of Section to display
    • eventsList - array of Events within the Section. Each Event is made up of:
      • id - unique, ordered identifier for an Event
      • name - name of Event to display
      • type - type of event which determines event icon
        • valid values: food, education, talk, bus, dev
      • imageUrl - URL to banner image for Event detail view
      • startDate - start date and time of event (YYYY-MM-DD HH:MM:SS)
      • endDate - end date and time of event (YYYY-MM-DD HH:MM:SS)
      • location - Location object
        • building - name of building Event takes place
        • level - floor Event takes place
        • room - room Event takes place
        • description - Event description
        • speakerList - array of Speakers
          • id - unique, ordered identifier for a Speaker
          • name - name of Speaker
          • organization - organization to which Speaker belongs
          • description - Speaker description
          • imageUrl - URL to image of speaker (ideally small)

Announcements

The announcements endpoint should return a JSON array with the following:

  • Announcement
    • text - Announcement text
    • ts - timestamp of announcement (YYYY-MM-DD HH:MM:SS)

Feedback

POST request with the following fields:

  • id - event unique identifier (from schedule)
  • rating - rating of event
Clone this wiki locally