impl stubbed out scrape and push

This commit is contained in:
Bel LaPointe
2022-01-09 22:28:03 -05:00
parent ad9af0a5db
commit 37c66244df
9 changed files with 453 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ type Job struct {
Pickup JobLocation
Dropoff JobLocation
Weight int
Miles int
Meta string
}
@@ -21,9 +22,10 @@ type JobLocation struct {
func (j Job) String() string {
return fmt.Sprintf(
`%s => %s, Weight:%d, Notes:%s`,
`%s => %s (%d miles), Weight:%d, Notes:%s`,
j.Pickup.String(),
j.Dropoff.String(),
j.Miles,
j.Weight,
j.Meta,
)

View File

@@ -23,6 +23,7 @@ type ntgVisionJob struct {
DropoffDate string `json:"cDate"`
DropoffCity string `json:"cCity"`
DropoffState string `json:"cState"`
Miles int `json:"miles"`
Weight int `json:"weight"`
Equipment string `json:"equip"`
Temp string `json:"temp"`
@@ -43,6 +44,7 @@ func (ntgJob ntgVisionJob) Job() Job {
City: ntgJob.DropoffCity,
State: ntgJob.DropoffState,
},
Miles: ntgJob.Miles,
Weight: ntgJob.Weight,
Meta: fmt.Sprintf("equipment:%s", ntgJob.Equipment),
}

View File

@@ -19,17 +19,17 @@
{
"id": 4650338,
"sDate": "01/12/22",
"sCity": "Columbus",
"sCity": "Somewhere",
"sState": "OH",
"sdh": null,
"cDate": "01/13/22",
"cCity": "Jamaica",
"cState": "NY",
"cCity": "SomewhereElse",
"cState": "GA",
"cdh": null,
"stopCnt": 2,
"miles": 578,
"weight": 5000,
"equip": "Str Truck W/ Lift Gate",
"miles": 378,
"weight": 2500,
"equip": "107 tall",
"temp": "",
"alertReasons": []
}