Я хочу знать, как использовать ebay sdk в django, я загрузил и установил ebaysdk, но получаю сообщение об ошибке: -
ConnectionConfigError at /add_item/
'config file ../ebay/ebay.yaml not found. Set config_file=None for use without YAML config.'
'add_item' - это функция в views.py, вызываемая, когда кнопка addItem нажата кнопка.
def add_item(request):
api = Connection(config_file="../ebay/ebay.yaml", domain="api.sandbox.ebay.com", debug=True)
request = {
"Item": {
"Title": "Professional Mechanical Keyboard",
"Country": "US",
"Location": "IT",
"Site": "US",
"ConditionID": "1000",
"PaymentMethods": "PayPal",
"PayPalEmailAddress": "nobody@gmail.com",
"PrimaryCategory": {"CategoryID": "33963"},
"Description": "A really nice mechanical keyboard!",
"ListingDuration": "Days_10",
"StartPrice": "150",
"Currency": "USD",
"ReturnPolicy": {
"ReturnsAcceptedOption": "ReturnsAccepted",
"RefundOption": "MoneyBack",
"ReturnsWithinOption": "Days_30",
"Description": "If you are not satisfied, return the keyboard.",
"ShippingCostPaidByOption": "Buyer"
},
"ShippingDetails": {
"ShippingServiceOptions": {
"FreeShipping": "True",
"ShippingService": "USPSMedia"
}
},
"DispatchTimeMax": "3"
}
}
api.execute("AddItem", request)