Skip to content
/ ebay Public

Python api to build and send XML Trading API requests to eBay

License

Notifications You must be signed in to change notification settings

wrhansen/ebay

Repository files navigation

01/13/2012 10:14:18 AM
__author__ = "Wesley Hansen"

What does this API do?
	This API is designed to build an XML request file and then send the request
	to the correct eBay server. Currently this API supports most calls from
	eBay's Trading API. This includes the calls: AddItem, GetItem, EndItem,
	RelistItem,	ReviseItem, etc...
	
	This API also has functionality to build the requests and insert them into a
	BulkDataExchange container for use with eBay's Large Merchant Services(LMS)
	API. 


How to use this API:
	It's really simple to use! For example, let's create a simple request to end
	an existing item on ebay:
	
	from ebay.trading import EndItemRequest#For the request
	import ebay#For the EbayAPIConnection
	
	#Create the request object
	enditem = EndItemRequest()
	
	#Update the request structure
	enditem.update( {
		'item_id': '11201513513590',
		'ending_reason': 'NotAvailable',
	})
	
	#Build the XML request
	request = enditem.get_element()
	
	
	#Create a connection object
	ebay.EbayAPIConnection( request=enditem )
	
	#Send the request
	connection.send_request()
	
	#Read the response
	print connection.get_response().read()


Requirements:
	-The eBay API uses etree._Element to build the requests, so
	it requires the lxml module.
	-This api also uses the simplejson module to read the credentials structure
	
	If you're running Ubuntu/Linux install the python packages:
		sudo apt-get install python-lxml python-simplejson
		
	
	-A basic knowledge of what information a request needs to build the XML
	request for sending to the eBay server.

Notes:
	There are plans to branch this API out to support more of eBay's APIs. And
	there are also plans to add more of Trading API's calls as well as more
	validation.
	Any help is welcome!

	Check out the examples/ directory for more samples on how to use the API.
	Also make sure to check out README_MORE_INFO for more information about this
	API and how to use it and set it up.
	
If you have any questions or comments, feel free to reach me at:
wes@ridersdiscount.com!
	


About

Python api to build and send XML Trading API requests to eBay

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages