impl stubbed out scrape and push
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
12
broker/testdata/ntgvision_response.json
vendored
12
broker/testdata/ntgvision_response.json
vendored
@@ -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": []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user