Jácotei API消费软件包
jacotei-api的Python项目详细描述
#jacotei-api-sdk-python3
/usr/bin/python3
import json
from jacotei_api_v1 import*
from jacotei_api_v1.api import*
from jacotei_api_v1.model import*
from jacotei_api_v1.client import apiclient;
apiclient=client.apiclient({
'client_id':'xxxxx',
'访问_令牌':'xxxx'},
'https://webapisb.jacotei.com.br/publisher/v1')
offers-api=offersapi.offersapi(apiclient)
offer-request=offerequest.offerequest()
offer-request.offers=[]
for i in range(0,1000):
offer=offer.offer()
offer.sku=i
offer.available=true;
offer.title='produto'+str(i)
offer.link='http://aasdfaf.com/asdflasdf'
offer.images=['http://aasdfaf.com/asdflasdf.jpg']
offer.categories=['categoria','subcategoria','sub subcategoria']
price=offerprice.offerprice()
price.price=1.99
price.installation=1
price.installation=1.99
offer.prices=[price]
offer=[价格]
offer=[报价].offer=[报价]append(报价)
尝试:
offers=[报价结果]=报价API.update=[报价]使用后更新报价(offers=offer=[报价]请求)
打印(vars(offers=[报价结果])
除了e:
print(e.msg)
````
/usr/bin/python3
import json
from jacotei_api_v1 import*
from jacotei_api_v1.api import*
from jacotei_api_v1.model import*
from jacotei_api_v1.client import apiclient;
apiclient=client.apiclient({
'client_id':'xxxxx',
'访问_令牌':'xxxx'},
'https://webapisb.jacotei.com.br/publisher/v1')
offers-api=offersapi.offersapi(apiclient)
offer-request=offerequest.offerequest()
offer-request.offers=[]
for i in range(0,1000):
offer=offer.offer()
offer.sku=i
offer.available=true;
offer.title='produto'+str(i)
offer.link='http://aasdfaf.com/asdflasdf'
offer.images=['http://aasdfaf.com/asdflasdf.jpg']
offer.categories=['categoria','subcategoria','sub subcategoria']
price=offerprice.offerprice()
price.price=1.99
price.installation=1
price.installation=1.99
offer.prices=[price]
offer=[价格]
offer=[报价].offer=[报价]append(报价)
尝试:
offers=[报价结果]=报价API.update=[报价]使用后更新报价(offers=offer=[报价]请求)
打印(vars(offers=[报价结果])
除了e:
print(e.msg)
````