Documentation ¶
Index ¶
- type Bill
- func (b *Bill) CreateTweet(billURL string) string
- func (b *Bill) FetchBillData() (string, string, []LegistarAction, error)
- func (b *Bill) GetActions() []LegistarAction
- func (b *Bill) GetCleanBillID() string
- func (b *Bill) GetTweetURL() string
- func (b *Bill) ParseBillID(text string) string
- func (b *Bill) SearchBill() (string, error)
- func (b *Bill) SetNextRun()
- type LegistarAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bill ¶
type Bill struct { PK uint `gorm:"primary_key"` TweetID *int64 `json:"tweet_id,omitempty"` TweetUser string `gorm:"size:250" json:"tweet_user"` TweetText string `gorm:"size:300" json:"tweet_text"` LastTweetID *int64 `json:"last_tweet_id,omitempty"` BillID string `gorm:"size:25" json:"id,omitempty"` Title string `gorm:"size:250" json:"title"` Classification string `gorm:"size:250" json:"classification"` URL string `gorm:"size:250" json:"url"` Active bool `gorm:"default:true"` Data string `gorm:"type:text"` NextRun *time.Time }
Bill is a single bill object in the database
func (*Bill) CreateTweet ¶
CreateTweet makes a tweet string based on the bill's information
func (*Bill) FetchBillData ¶
func (b *Bill) FetchBillData() (string, string, []LegistarAction, error)
FetchBillData pulls updated LegistarAction information from a bill's detail URL
func (*Bill) GetActions ¶
func (b *Bill) GetActions() []LegistarAction
GetActions loads all actions from a bill's JSON data as LegistarAction objects
func (*Bill) GetCleanBillID ¶
GetCleanBillID returns the bill ID in a format for presentation
func (*Bill) GetTweetURL ¶
GetTweetURL returns the Councilmatic URL if it exists for display and defaults to returning the bill's Legistar URL
func (*Bill) ParseBillID ¶
ParseBillID pulls the bill identifier from a given string
func (*Bill) SearchBill ¶
SearchBill tries to find the detail page for a bill from Legistar
func (*Bill) SetNextRun ¶
func (b *Bill) SetNextRun()
SetNextRun updates the time the bill should be queried next