WiiSOAP/cas.go
Spotlight ca35a37589
Migrate getKey to be apart of Envelope
We do not need to specify e.doc repeatedly.
2022-01-09 05:29:55 -06:00

43 lines
733 B
Go

package main
func listItems(e *Envelope) {
titleId, err := e.getKey("TitleId")
if err != nil {
e.Error(9, "Unable to obtain title.", err)
}
e.AddKVNode("ListResultTotalSize", "1")
e.AddCustomType(Items{
TitleId: titleId,
Contents: ContentsMetadata{
TitleIncluded: false,
ContentIndex: 0,
},
Attributes: []Attributes{
{
Name: "TitleVersion",
Value: "0",
},
{
Name: "Prices",
Value: "1",
},
},
Ratings: Ratings{
Name: "E",
Rating: 1,
Age: 9,
},
Prices: Prices{
ItemId: 0,
Price: Price{
Amount: 100,
Currency: "POINTS",
},
// Literally every Limit except for PR works
Limits: LimitStruct(TR),
LicenseKind: "RENTAL",
},
})
}