24 lines
394 B
Go
24 lines
394 B
Go
package anilibria
|
|
|
|
import (
|
|
"encoding/json"
|
|
"errors"
|
|
|
|
"git.thefoxon.ru/anilibria/anilibria-go/model"
|
|
)
|
|
|
|
func GetTitleUpdates() (titles *[]model.TitleList, err error) {
|
|
|
|
reqBody, status, err := request("GET", "/v3/title/updates", nil)
|
|
|
|
if status != 200 {
|
|
return nil, errors.New(errorFetchTitle)
|
|
}
|
|
|
|
if err = json.Unmarshal(reqBody, &titles); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return
|
|
}
|