iarapi

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 12 Imported by: 0

README

IamResponding API Client

A golang client for the HTTP API for the IamResponding service. Not all endpoints are supported at this point.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apparatus

type Apparatus struct{}

TODO - we don't know what this looks like

type ApparatusList

type ApparatusList []*Apparatus

type Client

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

func NewClient

func NewClient(agency, user, password string) (*Client, error)

func (*Client) ApparatusList

func (c *Client) ApparatusList() (*ApparatusList, error)

func (*Client) Dispatchers

func (c *Client) Dispatchers() (*Dispatchers, error)

func (*Client) Incidents

func (c *Client) Incidents() (*IncidentList, error)

func (*Client) Member

func (c *Client) Member() (*MemberInfo, error)

func (*Client) Messages

func (c *Client) Messages() (*MessageList, error)

func (*Client) OnDutyAtCodes

func (c *Client) OnDutyAtCodes() (*OnDutyAtCodeList, error)

func (*Client) ResponderCodes

func (c *Client) ResponderCodes() (*ResponderCodes, error)

func (*Client) ResponderList

func (c *Client) ResponderList() (*ResponderList, error)

func (*Client) SearchIncidents

func (c *Client) SearchIncidents(isr *IncidentSearchRequest) (*IncidentList, error)

func (*Client) Subscriber

func (c *Client) Subscriber() (*SubscriberInfo, error)

type Dispatcher

type Dispatcher struct {
	CentralizedId  int    `json:"centralizedId"`
	DispatcherId   int    `json:"dispatcherId"`
	DispatcherName string `json:"dispatcherName"`
}

type Dispatchers

type Dispatchers struct {
	SubscriberId int           `json:"subscriberId"`
	Dispatchers  []*Dispatcher `json:"dispatchers"`
}

type Incident

type Incident struct {
	Id                      int         `json:"id"`
	ArrivedOn               string      `json:"arrivedOn"`
	MessageBody             string      `json:"messageBody"`
	DestinationEmailAddress string      `json:"destinationEmailAddress"`
	OriginationEmailAddress string      `json:"originationEmailAddress"`
	SubscriberId            int         `json:"subscriberId"`
	VerifiedAddressStatus   int         `json:"verifiedAddressStatus"`
	ArrivedOnString         string      `json:"arrivedOnString"`
	Index                   int         `json:"index"`
	Address                 string      `json:"address"`
	Location                string      `json:"location"`
	Direction               interface{} `json:"direction"`
	VerifiedStreetNumber    string      `json:"verifiedStreetNumber"`
	VerifiedStreetName      string      `json:"verifiedStreetName"`
	VerifiedCity            string      `json:"verifiedCity"`
	VerifiedState           string      `json:"verifiedState"`
	VerifiedCountry         string      `json:"verifiedCountry"`
	LongDirection           string      `json:"longDirection"`
	HasCoordinatesInBoddy   bool        `json:"hasCoordinatesInBoddy"`
	IsVerifiedAndActive     bool        `json:"isVerifiedAndActive"`
	AddedBy                 interface{} `json:"addedBy"`
	AddedOn                 string      `json:"addedOn"`
	LastUpdatedBy           interface{} `json:"lastUpdatedBy"`
	UpdatedOn               string      `json:"updatedOn"`
	TimeZoneId              int         `json:"timeZoneId"`
	IsDst                   bool        `json:"isDst"`
}

type IncidentList

type IncidentList []*Incident

type IncidentSearchRequest

type IncidentSearchRequest struct {
	StartTime time.Time
	EndTime   time.Time
	PageSize  int
	Page      int
}

func (IncidentSearchRequest) MarshalJSON

func (r IncidentSearchRequest) MarshalJSON() ([]byte, error)

type LoginReply

type LoginReply struct {
	Message string `json:"d"`
}

type LoginRequest

type LoginRequest struct {
	MemberLogin     bool   `json:"memberLogin"`
	Agency          string `json:"agencyName"`
	User            string `json:"memberfname"`
	Password        string `json:"memberpwd"`
	UrlTo           string `json:"urlTo"`
	RememberMe      bool   `json:"rememberPwd"`
	OverrideSession bool   `json:"overrideSession"`
}

type MemberInfo

type MemberInfo struct {
	Id                                 int         `json:"memberId"`
	SubscriberId                       int         `json:"subscriberId"`
	FirstName                          string      `json:"firstName"`
	LastName                           string      `json:"lastName"`
	ProfileImage                       string      `json:"profileImage"`
	MaxTimeEmergencyMode               int         `json:"maxTimeEmergencyMode"`
	ClearNow                           bool        `json:"clearNow"`
	ColorBorder                        int         `json:"colorBorder"`
	CanEditOwnSchedule                 bool        `json:"canEditOwnSchedule"`
	CanEditAllSchedules                bool        `json:"canEditAllSchedules"`
	AllowOwnPCFScheduling              bool        `json:"allowOwnPCFScheduling"`
	AllowOwnCFScheduling               bool        `json:"allowOwnCFScheduling"`
	CanManageEvents                    bool        `json:"canManageEvents"`
	AllowManageHydrants                bool        `json:"allowManageHydrants"`
	AllowDeleteHydrants                bool        `json:"allowDeleteHydrants"`
	AllowManageMarkers                 bool        `json:"allowManageMarkers"`
	AllowDeleteMarkers                 bool        `json:"allowDeleteMarkers"`
	PermittedToVerifyIncidentAddresses bool        `json:"permittedToVerifyIncidentAddresses"`
	PermittedToCreateGeofence          bool        `json:"permittedToCreateGeofence"`
	DefaultRespondNow                  string      `json:"defaultRespondNow"`
	Position                           string      `json:"position"`
	ReminderShifts                     string      `json:"reminderShifts"`
	PositionId                         int         `json:"positionId"`
	AllowToggleEmergencyDD             bool        `json:"allowToggleEmergencyDD"`
	AllowEditOwnProfile                bool        `json:"allowEditOwnProfile"`
	PermittedChangePage6               bool        `json:"permittedChangePage6"`
	AllowEditScrollMessage             bool        `json:"allowEditScrollMessage"`
	DefaultLocation                    string      `json:"defaultLocation"`
	DefaultCategory                    int         `json:"defaultCategory"`
	DefaultShiftDuration               int         `json:"defaultShiftDuration"`
	DoNotDisturb                       int         `json:"doNotDisturb"`
	DoNotDisturbStartTime              string      `json:"doNotDisturbStartTime"`
	DoNotDisturbFinishTime             string      `json:"doNotDisturbFinishTime"`
	TextMessageAddressDND              bool        `json:"textMessageAddressDND"`
	AppPushNotificationsDND            bool        `json:"appPushNotificationsDND"`
	DoNotDisturbDevice                 bool        `json:"doNotDisturbDevice"`
	DeviceToken                        interface{} `json:"deviceToken"`
	DeviceActive                       bool        `json:"deviceActive"`
	MemberEmail                        string      `json:"memberEmail"`
	SecondaryEmail                     string      `json:"secondaryEmail"`
	TextMemberAddress                  string      `json:"textMemberAddress"`
}

type Message

type Message struct {
	Id           string    `json:"id"`
	MessageId    int       `json:"messageId"`
	SubscriberId int       `json:"subscriberId"`
	Message      string    `json:"message"`
	CreatedDate  time.Time `json:"createdDate"`
}

type MessageList

type MessageList []*Message

type OnDutyAtCode

type OnDutyAtCode struct {
	Id           string `json:"id"`
	SubscriberId int    `json:"subscriberId"`
	KeyEntry     string `json:"keyEntry"`
}

type OnDutyAtCodeList

type OnDutyAtCodeList []*OnDutyAtCode

type Responder

type Responder struct {
	Id             string    `json:"id"`
	Name           string    `json:"name"`
	Position       string    `json:"position"`
	RespondingTo   string    `json:"respondingTo"`
	CalledAt       time.Time `json:"calledAt"`
	EtaBefore      time.Time `json:"etaBefore"`
	LastName       string    `json:"lastName"`
	IsMutualAid    bool      `json:"isMutualAid"`
	SubscriberName string    `json:"subscriberName"`
	SubscriberId   int       `json:"subscriberId"`
	Order          int       `json:"order"`
	ImageUrl       string    `json:"imageUrl"`
	ColorBorder    int       `json:"colorBorder"`
	MemberId       int       `json:"memberId"`
	Expired        time.Time `json:"expired"`
	TimeZoneId     int       `json:"timeZoneId"`
	IsDst          bool      `json:"isDst"`
	ResponseCodeId int       `json:"responseCodeId"`
}

type ResponderCode

type ResponderCode struct {
	Id                int    `json:"id"`
	SubscriberId      int    `json:"subscriberId"`
	KeyEntry          string `json:"keyEntry"`
	StatusForTracking bool   `json:"statusForTracking"`
	IsTelephoneKey    bool   `json:"isTelephoneKey"`
	IsDefaultKey      bool   `json:"isDefaultKey"`
	CustomSortOrder   int    `json:"customSortOrder"`
}

type ResponderCodes

type ResponderCodes struct {
	ResponseCodes []*ResponderCode `json:"responseCodes"`
	TelephoneKeys []*ResponderCode `json:"telephoneKeys"`
}

type ResponderList

type ResponderList []*Responder

type SubscriberInfo

type SubscriberInfo struct {
	Id              int    `json:"subscriberId"`
	StatusID        int    `json:"statusID"`
	Name            string `json:"name"`
	TimeZone        int    `json:"timeZone"`
	AssignedPhone   string `json:"assignedPhone"`
	AdditionalPhone string `json:"additionalPhone"`
	Location        struct {
		Lat float64 `json:"lat"`
		Lng float64 `json:"lng"`
	} `json:"location"`
	EnableEmailInput         bool   `json:"enableEmailInput"`
	LogoImage                string `json:"logoImage"`
	ScreenName               string `json:"screenName"`
	Country                  string `json:"country"`
	CountryCode              string `json:"countryCode"`
	TelephoneKeyEntries1     string `json:"telephoneKeyEntries1"`
	TelephoneKeyEntries2     string `json:"telephoneKeyEntries2"`
	TelephoneKeyEntries3     string `json:"telephoneKeyEntries3"`
	TelephoneKeyEntries4     string `json:"telephoneKeyEntries4"`
	TelephoneKeyEntries5     string `json:"telephoneKeyEntries5"`
	TelephoneKeyEntries6     string `json:"telephoneKeyEntries6"`
	TelephoneKeyEntries7     string `json:"telephoneKeyEntries7"`
	TelephoneKeyEntries8     string `json:"telephoneKeyEntries8"`
	TelephoneKeyEntries9     string `json:"telephoneKeyEntries9"`
	TelephoneKeyEntriesDef   string `json:"telephoneKeyEntriesDef"`
	AutoClear                bool   `json:"autoClear"`
	MinutesToClearEtaExpired int    `json:"minutesToClearEtaExpired"`
	MaxTimeInToggleView      int    `json:"maxTimeInToggleView"`
	City                     string `json:"city"`
	State                    string `json:"state"`
	EnableDigitalDashboard   bool   `json:"enableDigitalDashboard"`
	CurrentDate              string `json:"currentDate"`
	CurrentTime              string `json:"currentTime"`
	ToggleInDashboard        bool   `json:"toggleInDashboard"`
	TimeZoneId               int    `json:"timeZoneId"`
	IsAffectedByDstChange    bool   `json:"isAffectedByDstChange"`
	OldTimeZoneId            int    `json:"oldTimeZoneId"`
	OldIsAffectedByDstChange bool   `json:"oldIsAffectedByDstChange"`
	EnableLegacyDashboard    bool   `json:"enableLegacyDashboard"`
	Emailaddr                string `json:"emailaddr"`
	IsActive                 bool   `json:"isActive"`
	NameForDispatcherUse     string `json:"nameForDispatcherUse"`
	TtdToggleInDashboard     bool   `json:"ttdToggleInDashboard"`
	AllowSpecialShifts       bool   `json:"allowSpecialShifts"`
}

Jump to

Keyboard shortcuts

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