nysenateapi

package module
v0.0.0-...-ddf8ae3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(token string) *API

func NewWithVerboseAPI

func NewWithVerboseAPI(api *verboseapi.NYSenateAPI) *API

func (*API) Bills

func (a *API) Bills(ctx context.Context, session string, offset int) (BillsResponse, error)

func (*API) GetBill

func (a *API) GetBill(ctx context.Context, session, printNo string) (*Bill, error)

func (*API) GetBillUpdates

func (a *API) GetBillUpdates(ctx context.Context, from, to time.Time) (BillsResponse, error)

type Action

type Action struct {
	Text    string     `json:"Text,omitempty"`
	Date    civil.Date `json:"Date,omitempty"`
	Chamber string     `json:"Chamber,omitempty"`
	Version string     `json:"Version,omitempty"`
}

type Bill

type Bill struct {
	PrintNo    string `json:"PrintNo"`
	Version    string `json:"Version,omitempty"`
	Session    int    `json:"Session"`
	Chamber    string `json:"Chamber,omitempty"`
	BillType   string `json:"BillType,omitempty"`
	Resolution bool   `json:"Resolution,omitempty"`

	Published  time.Time   `json:"Published,omitempty"`
	Status     string      `json:"Status,omitempty"`
	Committee  string      `json:"Committee,omitempty"`
	Milestones []Milestone `json:"Milestones,omitempty"`
	Actions    []Action    `json:"Actions,omitempty"`
	Votes      []Vote      `json:"Votes,omitempty"`
	Sponsors   []Sponsor   `json:"Sponsors,omitempty"`

	Title      string `json:"Title,omitempty"`
	Summary    string `json:"Summary,omitempty"`
	LawSection string `json:"LawSection,omitempty"`
	LawCode    string `json:"LawCode,omitempty"`
	ActClause  string `json:"ActClause,omitempty"`

	SameAsPrintNo    string   `json:"SameAsPrintNo,omitempty"`
	PreviousVersions []string `json:"PreviousVersions,omitempty"`
}

type BillReference

type BillReference struct {
	PrintNo string `json:"PrintNo,omitempty"`
	Session int    `json:"Session,omitempty"`
}

type BillsResponse

type BillsResponse struct {
	Bills []BillReference
}

type Milestone

type Milestone struct {
	Type      string
	Date      civil.Date
	Committee string `json:"Committee,omitempty"`
}
type Sponsor struct {
	ID    int
	Name  string
	Short string
}

type Vote

type Vote struct {
	VoteType  string // COMMITTEE, FLOOR
	Date      civil.Date
	Version   string `json:"Version,omitempty"`
	Chamber   string `json:"Chamber,omitempty"`
	Committee string `json:"Committee,omitempty"`
	Votes     []VoteEntry
}

type VoteEntry

type VoteEntry struct {
	ID    int
	Name  string `json:"Name,omitempty"`
	Short string `json:"Short,omitempty"`
	Vote  string // Aye, Nay, Excused
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL