grpc.go 491 B

123456789101112131415161718192021
  1. package bangumi
  2. import (
  3. "context"
  4. seasongrpc "go-common/app/service/openplatform/pgc-season/api/grpc/season/v1"
  5. "github.com/pkg/errors"
  6. )
  7. // CardsInfoReply pgc cards info
  8. func (d *Dao) CardsInfoReply(c context.Context, seasonIds []int32) (res map[int32]*seasongrpc.CardInfoProto, err error) {
  9. arg := &seasongrpc.SeasonInfoReq{SeasonIds: seasonIds}
  10. info, err := d.rpcClient.Cards(c, arg)
  11. if err != nil {
  12. err = errors.Wrapf(err, "%v", arg)
  13. return
  14. }
  15. res = info.Cards
  16. return
  17. }