Return an actual response object
This commit is contained in:
parent
0860e76440
commit
20dd89649a
12
client.go
12
client.go
@ -126,11 +126,21 @@ func (c *AllyApi) MarketClock() (resp MarketClockResponse) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *AllyApi) MarketQuotes(symbols ...string) {
|
/**
|
||||||
|
Given a list of symbols, return an result struct of quote history
|
||||||
|
*/
|
||||||
|
func (c *AllyApi) MarketQuotes(symbols ...string) (resp MarketQuotesResponse) {
|
||||||
v := url.Values{
|
v := url.Values{
|
||||||
"symbols": symbols,
|
"symbols": symbols,
|
||||||
}
|
}
|
||||||
fmt.Printf("%s\n", c.getWithParameters("market/ext/quotes", v))
|
fmt.Printf("%s\n", c.getWithParameters("market/ext/quotes", v))
|
||||||
|
c.marshalWithQuery("market/ext/quotes", v, &resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AllyApi) marshalWithQuery(p string, v url.Values, i interface{}) {
|
||||||
|
resp := c.getWithParameters(p, v)
|
||||||
|
_ = xml.Unmarshal(resp, &i)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why does this work?? wtf??
|
// Why does this work?? wtf??
|
||||||
|
Loading…
Reference in New Issue
Block a user