//LookupRawData returns openBD raw data
LookupRawData returns openBD raw data
// LookupRawData returns openBD raw data
func (a *AozoraAPI) LookupRawData(ctx context.Context, id string) (io.Reader, error) {
	bookId, err := strconv.Atoi(id)
	if err != nil {
		return nil, errs.New(
			fmt.Sprintf("invalid book id: %v", id),
			errs.WithContext("id", id),
		)
	}
	b, err := a.server.CreateClient().LookupBookRawContext(ctx, bookId)
	if err != nil {
		return nil, errs.Wrap(err, errs.WithContext("id", id))
	}
	return bytes.NewReader(b), nil
}
func ( a * AozoraAPI ) LookupRawData ( ctx context . Context , id string ) ( io . Reader , error ) { bookId , err := strconv . Atoi ( id ) if err != nil { return nil , errs . New ( fmt . Sprintf ( " " , id ) , errs . WithContext ( " " , id ) , ) } b , err := a . server . CreateClient ( ) . LookupBookRawContext ( ctx , bookId ) if err != nil { return nil , errs . Wrap ( err , errs . WithContext ( " " , id ) ) } return bytes . NewReader ( b ) , nil }
LookupRawData returns openBD raw data
LookupRawData returns openBD raw data