-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
var body struct {
DataSheetID string `json:"datasheet_id"`
RecordID string `json:"record_id"`
}
if err := gin_context.ShouldBindJSON(&body); err != nil {
gin_context.Set("resp", err)
return
}
credential := common.NewCredential("**************")
cpf := profile.NewClientProfile()
datasheet, _ := vika.NewDatasheet(credential, body.DataSheetID, cpf)
request := vika.NewDescribeRecordRequest()
request.RecordIds = common.StringPtrs([]string{body.RecordID})
records, err := datasheet.DescribeAllRecords(request)
if err != nil {
gin_context.Set("resp", err)
return
}
for _, record := range records {
fmt.Println(
record.RecordId,
record.CreatedAt,
)
for name, value := range *record.Fields {
fmt.Println(name, value)
}
fmt.Println()
}
gin_context.Set("resp", "ok")其中
request.RecordIds = common.StringPtrs([]string{body.RecordID}) 拼接的url 调试结果是
https://api.vika.cn/fusion/v1/datasheets/datasheet_id/records?pageNum=1&pageSize=1000&recordIds.0=record_idRecordIds 参数有点问题 recordIdsa.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working