feat: Add Response#Raw with raw json string
This commit is contained in:
parent
4973770c80
commit
bd47ce3567
2 changed files with 4 additions and 2 deletions
|
@ -46,6 +46,7 @@ func (c *Client) GetUpdates() (Response, error) {
|
|||
return res, err
|
||||
}
|
||||
|
||||
res.Raw = string(body)
|
||||
err = json.Unmarshal(body, &res)
|
||||
|
||||
if len(res.Result) > 0 {
|
||||
|
|
1
types.go
1
types.go
|
@ -3,6 +3,7 @@ package telegram
|
|||
type Response struct {
|
||||
Ok bool `json:"ok"`
|
||||
Result []Update `json:"result"`
|
||||
Raw string `json:""`
|
||||
}
|
||||
|
||||
type Author struct {
|
||||
|
|
Loading…
Reference in a new issue