1
This commit is contained in:
parent
d2f394ae84
commit
e342cfa5cd
@ -115,11 +115,12 @@ func (this* refreshMeta) doRefresh() {
|
|||||||
q5.Sort(this.batchNfts, func (a *nftInfo, b *nftInfo) bool {
|
q5.Sort(this.batchNfts, func (a *nftInfo, b *nftInfo) bool {
|
||||||
return a.contractAddress < b.contractAddress
|
return a.contractAddress < b.contractAddress
|
||||||
})
|
})
|
||||||
}
|
lastContractAddress := ""
|
||||||
|
nftMetas := []*nftMeta{}
|
||||||
//https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/refresh-metadata
|
|
||||||
func (this* refreshMeta) internalRefresh(contractAddress string, nftMetas []*nftMeta) {
|
|
||||||
for _, v := range this.batchNfts {
|
for _, v := range this.batchNfts {
|
||||||
|
if lastContractAddress == "" {
|
||||||
|
lastContractAddress = v.contractAddress
|
||||||
|
}
|
||||||
f5.GetHttpCliMgr().SendGoStyleRequest(
|
f5.GetHttpCliMgr().SendGoStyleRequest(
|
||||||
mt.Table.Config.GetById(0).GetGameapiUrl() + "/webapp/index.php",
|
mt.Table.Config.GetById(0).GetGameapiUrl() + "/webapp/index.php",
|
||||||
map[string]string{
|
map[string]string{
|
||||||
@ -149,7 +150,15 @@ func (this* refreshMeta) internalRefresh(contractAddress string, nftMetas []*nft
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if len(nftMetas) >= 200 {
|
||||||
|
lastContractAddress = ""
|
||||||
|
nftMetas = []*nftMeta{}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/refresh-metadata
|
||||||
|
func (this* refreshMeta) internalRefresh(contractAddress string, nftMetas []*nftMeta) {
|
||||||
if len(nftMetas) > 0 {
|
if len(nftMetas) > 0 {
|
||||||
data := struct {
|
data := struct {
|
||||||
NftMetaData []*nftMeta `json:"nft_metadata"`
|
NftMetaData []*nftMeta `json:"nft_metadata"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user