Documentation ¶
Overview ¶
legistar package is an API client for http://webapi.legistar.com/
Index ¶
- func DateTimeFilter(field, eq string, t time.Time) url.Values
- func IsNotFoundError(err error) bool
- func StringFilter(field, value string) url.Values
- type Client
- func (c Client) Call(ctx context.Context, endpoint string, params url.Values, data interface{}) error
- func (c Client) Event(ctx context.Context, ID int) (Event, error)
- func (c Client) EventItems(ctx context.Context, ID int) (EventItems, error)
- func (c Client) EventRollCalls(ctx context.Context, ID int) (RollCalls, error)
- func (c Client) EventVotes(ctx context.Context, ID int) (Votes, error)
- func (c Client) Events(ctx context.Context, f Filters) (Events, error)
- func (c Client) LookupWebURL(ctx context.Context, MatterID int) (string, error)
- func (c Client) Matter(ctx context.Context, ID int) (Matter, error)
- func (c Client) MatterAttachments(ctx context.Context, matterID int) (MatterAttachments, error)
- func (c Client) MatterHistories(ctx context.Context, ID int) (MatterHistories, error)
- func (c Client) MatterIndexes(ctx context.Context) (MatterIndexes, error)
- func (c Client) MatterSponsors(ctx context.Context, ID int) (MatterSponsors, error)
- func (c Client) MatterText(ctx context.Context, matterID, textID int) (MatterText, error)
- func (c Client) MatterTextVersions(ctx context.Context, matterID int) (MatterTextVersions, error)
- func (c Client) MatterTypes(ctx context.Context) (MatterTypes, error)
- func (c Client) Matters(ctx context.Context, f Filters) (Matters, error)
- func (c Client) OfficeRecords(ctx context.Context, f Filters) (OfficeRecords, error)
- func (c Client) Person(ctx context.Context, ID int) (Person, error)
- func (c Client) PersonOfficeRecords(ctx context.Context, ID int) (OfficeRecords, error)
- func (c Client) PersonRollCalls(ctx context.Context, ID int, f Filters) (RollCalls, error)
- func (c Client) PersonVotes(ctx context.Context, ID int, f Filters) (Votes, error)
- func (c Client) Persons(ctx context.Context, f Filters) (Persons, error)
- func (c Client) VoteTypes(ctx context.Context) (VoteTypes, error)
- type Event
- type EventDateFilter
- type EventItem
- type EventItemMatterAttachments
- type EventItems
- type EventLastModifiedFilter
- type Events
- type Filter
- type Filters
- type Matter
- type MatterAttachment
- type MatterAttachments
- type MatterEnactmentNumberFilter
- type MatterFileFilter
- type MatterHistories
- type MatterHistory
- type MatterIndex
- type MatterIndexes
- type MatterLastModifiedFilter
- type MatterSponsor
- type MatterSponsors
- type MatterText
- type MatterTextVersion
- type MatterTextVersions
- type MatterType
- type MatterTypeFilter
- type MatterTypes
- type Matters
- type OfficeRecord
- type OfficeRecordLastModifiedFilter
- type OfficeRecords
- type Person
- type PersonLastModifiedFilter
- type Persons
- type RollCall
- type RollCalls
- type ShortTime
- type Time
- type Vote
- type VoteType
- type VoteTypes
- type Votes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶
func StringFilter ¶
Types ¶
type Client ¶
type Client struct { Client string // i.e. Client in http://webapi.legistar.com/v1/{Client} LookupURL *url.URL Token string HttpClient *http.Client Limiter *rate.Limiter }
func (Client) EventItems ¶
EventItems http://127.0.0.1:7001/Events/379233/EventItems?AgendaNote=1&MinutesNote=1&Attachments=1
func (Client) EventRollCalls ¶
EventRollCalls http://webapi.legistar.com/Help/Api/GET-v1-Client-EventItems-EventItemId-RollCalls
func (Client) EventVotes ¶
EventVotes http://webapi.legistar.com/Help/Api/GET-v1-Client-EventItems-EventItemId-Votes
func (Client) Events ¶
Events http://webapi.legistar.com/Help/Api/GET-v1-Client-Events
func (Client) LookupWebURL ¶
LookupWebURL returns the Web URL for a MatterID
func (Client) MatterAttachments ¶
func (Client) MatterHistories ¶
func (Client) MatterIndexes ¶
func (c Client) MatterIndexes(ctx context.Context) (MatterIndexes, error)
func (Client) MatterSponsors ¶
func (Client) MatterText ¶
func (Client) MatterTextVersions ¶
func (Client) MatterTypes ¶
func (c Client) MatterTypes(ctx context.Context) (MatterTypes, error)
func (Client) OfficeRecords ¶
func (Client) PersonOfficeRecords ¶
func (Client) PersonRollCalls ¶
func (Client) PersonVotes ¶
type Event ¶
type Event struct { ID int `json:"EventId"` GUID string `json:"EventGuid"` LastModified Time `json:"EventLastModifiedUtc"` RowVersion string `json:"EventRowVersion"` BodyID int `json:"EventBodyId"` BodyName string `json:"EventBodyName"` Date Time `json:"EventDate"` Time ShortTime `json:"EventTime"` VideoStatus string `json:"EventVideoStatus"` AgendaStatusID int `json:"EventAgendaStatusId"` AgendaStatusName string `json:"EventAgendaStatusName"` MinutesStatusID int `json:"EventMinutesStatusId"` MinutesStatusName string `json:"EventMinutesStatusName"` Location string `json:"EventLocation"` AgendaFile string `json:"EventAgendaFile"` MinutesFile string `json:"EventMinutesFile"` AgendaLastPublished Time `json:"EventAgendaLastPublishedUTC"` MinutesLastPublished Time `json:"EventMinutesLastPublishedUTC"` Comment string `json:"EventComment"` VideoPath string `json:"EventVideoPath"` Media string `json:"EventMedia"` InSiteURL string `json:"EventInSiteURL"` Items EventItems `json:"EventItems"` }
type EventDateFilter ¶
func (EventDateFilter) Paramters ¶
func (p EventDateFilter) Paramters() url.Values
type EventItem ¶
type EventItem struct { ID int `json:"EventItemId"` GUID string `json:"EventItemGuid"` LastModified Time `json:"EventItemLastModifiedUtc"` RowVersion string `json:"EventItemRowVersion"` EventID int `json:"EventItemEventId"` AgendaSequence int `json:"EventItemAgendaSequence"` MinutesSequence int `json:"EventItemMinutesSequence"` AgendaNumber string `json:"EventItemAgendaNumber"` Video int `json:"EventItemVideo"` VideoIndex int `json:"EventItemVideoIndex"` Version string `json:"EventItemVersion"` AgendaNote string `json:"EventItemAgendaNote"` MinutesNote string `json:"EventItemMinutesNote"` ActionID int `json:"EventItemActionId"` ActionName string `json:"EventItemActionName"` ActionText string `json:"EventItemActionText"` PassedFlag int `json:"EventItemPassedFlag"` PassedFlagName string `json:"EventItemPassedFlagName"` RollCallFlag int `json:"EventItemRollCallFlag"` FlagExtra int `json:"EventItemFlagExtra"` Title string `json:"EventItemTitle"` Tally string `json:"EventItemTally"` AccelaRecordID string `json:"EventItemAccelaRecordId"` Consent int `json:"EventItemConsent"` MoverID int `json:"EventItemMoverId"` Mover string `json:"EventItemMover"` SeconderID int `json:"EventItemSeconderId"` Seconder string `json:"EventItemSeconder"` MatterID int `json:"EventItemMatterId"` MatterGUID string `json:"EventItemMatterGuid"` MatterFile string `json:"EventItemMatterFile"` MatterName string `json:"EventItemMatterName"` MatterType string `json:"EventItemMatterType"` MatterStatus string `json:"EventItemMatterStatus"` MatterAttachments []EventItemMatterAttachments `json:"EventItemMatterAttachments"` }
type EventItemMatterAttachments ¶
type EventItemMatterAttachments struct { ID int `json:"MatterAttachmentId"` GUID string `json:"MatterAttachmentGuid"` LastModified Time `json:"MatterAttachmentLastModifiedUtc"` RowVersion string `json:"MatterAttachmentRowVersion"` Name string `json:"MatterAttachmentName"` Hyperlink string `json:"MatterAttachmentHyperlink"` FileName string `json:"MatterAttachmentFileName"` MatterVersion string `json:"MatterAttachmentMatterVersion"` IsHyperlink bool `json:"MatterAttachmentIsHyperlink"` Binary string `json:"MatterAttachmentBinary"` IsSupportingDocument bool `json:"MatterAttachmentIsSupportingDocument"` ShowOnInternetPage bool `json:"MatterAttachmentShowOnInternetPage"` IsMinuteOrder bool `json:"MatterAttachmentIsMinuteOrder"` IsBoardLetter bool `json:"MatterAttachmentIsBoardLetter"` AgiloftID int `json:"MatterAttachmentAgiloftId"` Description string `json:"MatterAttachmentDescription"` PrintWithReports bool `json:"MatterAttachmentPrintWithReports"` Sort int `json:"MatterAttachmentSort"` }
type EventItems ¶
type EventItems []EventItem
type EventLastModifiedFilter ¶
func (EventLastModifiedFilter) Paramters ¶
func (p EventLastModifiedFilter) Paramters() url.Values
type Filters ¶
func AndFilters ¶
type Matter ¶
type Matter struct { ID int `json:"MatterId"` GUID string `json:"MatterGuid"` LastModified Time `json:"MatterLastModifiedUtc"` RowVersion string `json:"MatterRowVersion"` File string `json:"MatterFile"` Name string `json:"MatterName"` Title string `json:"MatterTitle"` TypeID int `json:"MatterTypeId"` TypeName string `json:"MatterTypeName"` StatusID int `json:"MatterStatusId"` StatusName string `json:"MatterStatusName"` BodyID int `json:"MatterBodyId"` BodyName string `json:"MatterBodyName"` IntroDate Time `json:"MatterIntroDate"` AgendaDate Time `json:"MatterAgendaDate"` PassedDate Time `json:"MatterPassedDate"` EnactmentDate Time `json:"MatterEnactmentDate"` EnactmentNumber string `json:"MatterEnactmentNumber"` // aka Local Law Requester string `json:"MatterRequester"` Notes string `json:"MatterNotes"` Version string `json:"MatterVersion"` Text1 string `json:"MatterText1"` Text2 string `json:"MatterText2"` Text3 string `json:"MatterText3"` Text4 string `json:"MatterText4"` Text5 string `json:"MatterText5"` Date1 Time `json:"MatterDate1"` Date2 Time `json:"MatterDate2"` EXText1 string `json:"MatterEXText1"` EXText2 string `json:"MatterEXText2"` EXText3 string `json:"MatterEXText3"` EXText4 string `json:"MatterEXText4"` EXText5 string `json:"MatterEXText5"` EXText6 string `json:"MatterEXText6"` EXText7 string `json:"MatterEXText7"` EXText8 string `json:"MatterEXText8"` EXText9 string `json:"MatterEXText9"` EXText10 string `json:"MatterEXText10"` EXText11 string `json:"MatterEXText11"` EXDate1 Time `json:"MatterEXDate1"` EXDate2 Time `json:"MatterEXDate2"` EXDate3 Time `json:"MatterEXDate3"` EXDate4 Time `json:"MatterEXDate4"` EXDate5 Time `json:"MatterEXDate5"` EXDate6 Time `json:"MatterEXDate6"` EXDate7 Time `json:"MatterEXDate7"` EXDate8 Time `json:"MatterEXDate8"` EXDate9 Time `json:"MatterEXDate9"` EXDate10 Time `json:"MatterEXDate10"` AgiloftID int `json:"MatterAgiloftId"` Reference string `json:"MatterReference"` RestrictViewViaWeb bool `json:"MatterRestrictViewViaWeb"` Reports []struct { ReportName string `json:"ReportName"` ReportURL string `json:"ReportURL"` ReportType string `json:"ReportType"` } `json:"MatterReports"` }
Matter http://webapi.legistar.com/Help/Api/GET-v1-Client-Matters
type MatterAttachment ¶
type MatterAttachment struct { ID int `json:"MatterAttachmentId"` GUID string `json:"MatterAttachmentGuid"` LastModified Time `json:"MatterAttachmentLastModifiedUtc"` RowVersion string `json:"MatterAttachmentRowVersion"` Name string `json:"MatterAttachmentName"` Link string `json:"MatterAttachmentHyperlink"` FileName string `json:"MatterAttachmentFileName"` MatterVersion string `json:"MatterAttachmentMatterVersion"` // 0 IsHyperlink bool `json:"MatterAttachmentIsHyperlink,omitempty"` Binary string `json:"MatterAttachmentBinary,omitempty"` IsSupportingDocument bool `json:"MatterAttachmentIsSupportingDocument,omitempty"` ShowOnInternetPage bool `json:"MatterAttachmentShowOnInternetPage"` IsMinuteOrder bool `json:"MatterAttachmentIsMinuteOrder,omitempty"` IsBoardLetter bool `json:"MatterAttachmentIsBoardLetter,omitempty"` AgiloftID int `json:"MatterAttachmentAgiloftId,omitempty"` Description string `json:"MatterAttachmentDescription,omitempty"` PrintWithReports bool `json:"MatterAttachmentPrintWithReports"` Sort int `json:"MatterAttachmentSort"` }
type MatterAttachments ¶
type MatterAttachments []MatterAttachment
type MatterEnactmentNumberFilter ¶
type MatterEnactmentNumberFilter string
func (MatterEnactmentNumberFilter) Paramters ¶
func (p MatterEnactmentNumberFilter) Paramters() url.Values
type MatterFileFilter ¶
type MatterFileFilter string
func (MatterFileFilter) Paramters ¶
func (p MatterFileFilter) Paramters() url.Values
type MatterHistories ¶
type MatterHistories []MatterHistory
type MatterHistory ¶
type MatterHistory struct { ID int `json:"MatterHistoryId"` GUID string `json:"MatterHistoryGuid"` LastModified Time `json:"MatterHistoryLastModifiedUtc"` RowVersion string `json:"MatterHistoryRowVersion"` EventID int `json:"MatterHistoryEventId"` AgendaSequence int `json:"MatterHistoryAgendaSequence"` MinutesSequence int `json:"MatterHistoryMinutesSequence"` AgendaNumber string `json:"MatterHistoryAgendaNumber"` Video int `json:"MatterHistoryVideo"` VideoIndex int `json:"MatterHistoryVideoIndex"` Version string `json:"MatterHistoryVersion"` AgendaNote string `json:"MatterHistoryAgendaNote"` MinutesNote string `json:"MatterHistoryMinutesNote"` ActionDate Time `json:"MatterHistoryActionDate"` ActionID int `json:"MatterHistoryActionId"` ActionName string `json:"MatterHistoryActionName"` ActionText string `json:"MatterHistoryActionText"` ActionBodyID int `json:"MatterHistoryActionBodyId"` ActionBodyName string `json:"MatterHistoryActionBodyName"` PassedFlag int `json:"MatterHistoryPassedFlag"` // make bool PassedFlagName string `json:"MatterHistoryPassedFlagName"` // i.e. "Pass" RollCallFlag int `json:"MatterHistoryRollCallFlag"` FlagExtra int `json:"MatterHistoryFlagExtra"` Tally string `json:"MatterHistoryTally"` AccelaRecordID string `json:"MatterHistoryAccelaRecordId"` Consent int `json:"MatterHistoryConsent"` MoverID int `json:"MatterHistoryMoverId"` MoverName string `json:"MatterHistoryMoverName"` SeconderID int `json:"MatterHistorySeconderId"` SeconderName string `json:"MatterHistorySeconderName"` MatterStatusID int `json:"MatterHistoryMatterStatusId"` }
type MatterIndex ¶
type MatterIndex struct { ID int `json:"MatterIndexId"` GUID string `json:"MatterIndexGuid"` LastModified Time `json:"MatterIndexLastModifiedUtc"` RowVersion string `json:"MatterIndexRowVersion"` MatterID int `json:"MatterIndexMatterId"` IndexID int `json:"MatterIndexIndexId"` Name string `json:"MatterIndexName"` }
MatterIndex http://webapi.legistar.com/Help/Api/GET-v1-Client-MatterIndexes
type MatterIndexes ¶
type MatterIndexes []MatterIndex
type MatterLastModifiedFilter ¶
func (MatterLastModifiedFilter) Paramters ¶
func (p MatterLastModifiedFilter) Paramters() url.Values
type MatterSponsor ¶
type MatterSponsor struct { ID int `json:"MatterSponsorId"` GUID string `json:"MatterSponsorGuid"` LastModified Time `json:"MatterSponsorLastModifiedUtc"` RowVersion string `json:"MatterSponsorRowVersion"` MatterID int `json:"MatterSponsorMatterId"` MatterVersion string `json:"MatterSponsorMatterVersion"` Name string `json:"MatterSponsorName"` NameID int `json:"MatterSponsorNameId"` Sequence int `json:"MatterSponsorSequence"` BodyID int `json:"MatterSponsorBodyId"` LinkFlag int `json:"MatterSponsorLinkFlag"` }
MatterSponsor http://webapi.legistar.com/Help/Api/GET-v1-Client-Matters-MatterId-Sponsors
func (MatterSponsor) Slug ¶
func (s MatterSponsor) Slug() string
type MatterSponsors ¶
type MatterSponsors []MatterSponsor
type MatterText ¶
type MatterText struct { ID int `json:"MatterTextId"` GUID string `json:"MatterTextGuid"` LastModified Time `json:"MatterTextLastModifiedUtc"` RowVersion string `json:"MatterTextRowVersion"` MatterID int `json:"MatterTextMatterId"` Version string `json:"MatterTextVersion"` Plain string `json:"MatterTextPlain"` RTF string `json:"MatterTextRtf"` }
MatterText http://webapi.legistar.com/Help/Api/GET-v1-Client-Matters-MatterId-Texts-MatterTextId
func (MatterText) SimplifiedRTF ¶
func (t MatterText) SimplifiedRTF() string
SimplifiedRTF returns RTF without the "$file\nBy Councilmembers ...\n\n..Title:\n$title" preamble
func (MatterText) SimplifiedText ¶
func (t MatterText) SimplifiedText() string
SimplifiedText returns text without the "$file\nBy Councilmembers ...\n\n..Title:\n$title" preamble
type MatterTextVersion ¶
MatterTextVersion http://webapi.legistar.com/Help/Api/GET-v1-Client-Matters-MatterId-Versions
type MatterTextVersions ¶
type MatterTextVersions []MatterTextVersion
func (MatterTextVersions) LatestTextID ¶
func (m MatterTextVersions) LatestTextID() int
type MatterType ¶
type MatterType struct { ID int `json:"MatterTypeId"` GUID string `json:"MatterTypeGuid"` LastModified Time `json:"MatterTypeLastModifiedUtc"` RowVersion string `json:"MatterTypeRowVersion"` Name string `json:"MatterTypeName"` Sort int `json:"MatterTypeSort"` ActiveFlag int `json:"MatterTypeActiveFlag"` Description string `json:"MatterTypeDescription"` UsedFlag int `json:"MatterTypeUsedFlag"` }
MatterType http://webapi.legistar.com/Help/Api/GET-v1-Client-MatterTypes
type MatterTypeFilter ¶
type MatterTypeFilter string
func (MatterTypeFilter) Paramters ¶
func (p MatterTypeFilter) Paramters() url.Values
type MatterTypes ¶
type MatterTypes []MatterType
type OfficeRecord ¶
type OfficeRecord struct { ID int `json:"OfficeRecordId"` GUID string `json:"OfficeRecordGuid"` LastModified Time `json:"OfficeRecordLastModifiedUtc"` RowVersion string `json:"OfficeRecordRowVersion"` FirstName string `json:"OfficeRecordFirstName"` LastName string `json:"OfficeRecordLastName"` Email string `json:"OfficeRecordEmail"` FullName string `json:"OfficeRecordFullName"` StartDate Time `json:"OfficeRecordStartDate"` EndDate Time `json:"OfficeRecordEndDate"` Sort int `json:"OfficeRecordSort"` PersonID int `json:"OfficeRecordPersonId"` BodyID int `json:"OfficeRecordBodyId"` BodyName string `json:"OfficeRecordBodyName"` Title string `json:"OfficeRecordTitle"` VoteDivider float64 `json:"OfficeRecordVoteDivider"` ExtendFlag int `json:"OfficeRecordExtendFlag"` MemberTypeID int `json:"OfficeRecordMemberTypeId"` MemberType string `json:"OfficeRecordMemberType"` SupportNameID int `json:"OfficeRecordSupportNameId"` SupportFullName string `json:"OfficeRecordSupportFullName"` }
type OfficeRecordLastModifiedFilter ¶
func (OfficeRecordLastModifiedFilter) Paramters ¶
func (f OfficeRecordLastModifiedFilter) Paramters() url.Values
type OfficeRecords ¶
type OfficeRecords []OfficeRecord
type Person ¶
type Person struct { ID int `json:"PersonId"` GUID string `json:"PersonGuid"` ActiveFlag int `json:"PersonActiveFlag"` Email string `json:"PersonEmail"` Email2 string `json:"PersonEmail2"` LastModified Time `json:"PersonLastModifiedUtc"` FullName string `json:"PersonFullName"` FirstName string `json:"PersonFirstName"` LastName string `json:"PersonLastName"` WWW string `json:"PersonWWW"` WWW2 string `json:"PersonWWW2"` // Address, City, State, Zip, Phone, Fax Address1 string `json:"PersonAddress1"` City1 string `json:"PersonCity1"` State1 string `json:"PersonState1"` Zip1 string `json:"PersonZip1"` Phone string `json:"PersonPhone"` Fax string `json:"PersonFax"` Address2 string `json:"PersonAddress2"` City2 string `json:"PersonCity2"` State2 string `json:"PersonState2"` Zip2 string `json:"PersonZip2"` Phone2 string `json:"PersonPhone2"` Fax2 string `json:"PersonFax2"` }
http://webapi.legistar.com/Help/ResourceModel?modelName=GranicusPerson Note: LastModified not updated for Email, WWW or OfficeRecords updates
type PersonLastModifiedFilter ¶
func (PersonLastModifiedFilter) Paramters ¶
func (p PersonLastModifiedFilter) Paramters() url.Values
type RollCall ¶
type RollCall struct { ID int `json:"RollCallId"` GUID string `json:"RollCallGuid"` LastModified Time `json:"RollCallLastModifiedUtc"` RowVersion string `json:"RollCallRowVersion"` PersonID int `json:"RollCallPersonId"` PersonName string `json:"RollCallPersonName"` ValueID int `json:"RollCallValueId"` ValueName string `json:"RollCallValueName"` Sort int `json:"RollCallSort"` Result int `json:"RollCallResult"` EventItemID int `json:"RollCallEventItemId"` }
http://webapi.legistar.com/Help/Api/GET-v1-Client-EventItems-EventItemId-RollCalls
type ShortTime ¶
func (*ShortTime) UnmarshalJSON ¶
type Time ¶
func (*Time) UnmarshalJSON ¶
type Vote ¶
type Vote struct { ID int `json:"VoteId"` GUID string `json:"VoteGuid"` PersonID int `json:"VotePersonId"` PersonName string `json:"VotePersonName"` EventItemID int `json:"VoteEventItemId"` LastModified Time `json:"VoteLastModifiedUtc"` RowVersion []byte `json:"VoteRowVersion"` Result int `json:"VoteResult"` // 1=Afirmative, 2=Negative ValueID int `json:"VoteValueId"` ValueName string `json:"VoteValueName"` // i.e. Affirmative, Negative, ABsent Sort int `json:"VoteSort"` }
http://webapi.legistar.com/Help/ResourceModel?modelName=GranicusVote
type VoteType ¶
type VoteType struct { ID int `json:"VoteTypeId"` GUID string `json:"VoteTypeGuid"` LastModified Time `json:"VoteTypeLastModifiedUtc"` RowVersion string `json:"VoteTypeRowVersion"` Name string `json:"VoteTypeName"` PluralName string `json:"VoteTypePluralName"` UsedFor int `json:"VoteTypeUsedFor"` Result int `json:"VoteTypeResult"` Sort int `json:"VoteTypeSort"` }