Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Notifications

Jeremy Carbaugh edited this page Nov 25, 2013 · 13 revisions

Notifications will be based on entities:

  • bills
  • committees
  • legislators

Subscription to notifications will be based on the entities that are followed.

Process

  1. Fetch incoming data
  2. Match against subscriptions
  3. Generate queued notifications
  4. Batch notifications
  5. Send notifications

Notifications (batched and unbatched?) will be stored and able to be recalled for display in-app. Add screens for each type of notification.

Types of notifications

A bill I follow...

  • Is acted upon

    Type: bill/action

    Criteria: /bills where last_action_at > date of last import and actions where acted_at is greater than date time of last import and action type is one of "vetoed", "topresident", or "enacted"

    Fields: bill_id, type, acted_at

  • Is voted on

    Type: bill/vote

    Criteria: /votes where * voted_at* > timestamp of last import and vote type is one of "passage" or "cloture"

    Fields: bill_id, roll_id

  • Is scheduled for floor action

    Type: bill/upcoming

    Criteria: /upcoming_bills where legislative_day is greater than or equal to today.

    Fields: bill_id, legislative_day

A committee I follow...

  • Has a bill referred to it

    Type: committee/bill/referred

    Criteria: /bills where last_action_at > date of last import and actions where acted_at is greater than date time of last import and action type is "referral"

    Fields: bill_id, acted_at, committee_ids

A legislator I follow...

  • Introduces a bill

    Type: legislator/sponsor/introduction

    Criteria: /bills where introduced_on > date of last import

    Fields: legislator_id, bill_id, introduced_on

  • Votes

    Type: legislator/vote

    Criteria: /votes where * voted_at* > timestamp of last import and vote type is one of "passage", "cloture", "nomination", "impeachment", or "treaty"

    Fields: roll_id, bill_id, voted_at

  • Sponsors a bill that is scheduled for floor action

    Type: legislator/sponsor/upcoming

    Criteria: /upcoming_bills where legislative_day is greater than or equal to today.

    Fields: bill_id, legislative_day