o ckF[Q@shddlZddlmZmZddlmZddlZddlZddlZ ddl m Z ddlm Z GdddeZ dS)N)AWSQueryConnectionAWSAuthConnection)BotoServerError)ItemSet)handlercsReZdZdZdZ     dfdd Zd d Zdd d ZddZddZ Z S) ECSConnectionz ECommerce Connection For more information on how to use this module see: http://blog.coredumped.org/2010/09/search-for-books-on-amazon-using-boto.html z 2010-11-01NTecs.amazonaws.comr/cs0tt|j||||||||| | | | | |ddS)N)security_token profile_name)superr__init__)selfaws_access_key_idaws_secret_access_key is_secureportproxy proxy_port proxy_user proxy_passhostdebughttps_connection_factorypathr r  __class__3/usr/lib/python3/dist-packages/boto/ecs/__init__.pyr *s   zECSConnection.__init__cCsdgS)Necsr)rrrr_required_auth_capability5sz'ECSConnection._required_auth_capabilityc Csd|d<||d<|r||d<|d|d}|d}tj||jdkrCtjd |j|jftjd |t |j|j||durOt ||||}n|}t ||}t j|d||jsst |jd jd i|jd |S)zQ Utility method to handle calls to ECS and parsing of responses. AWSECommerceServiceService OperationItemPageNz /onca/xmlzutf-8z%s %sz%sz{Code}: {Message}rr) make_requestreaddecodebotologrstatuserrorreasonrrr XmlHandlerxmlsax parseStringencodeis_validformaterrors) ractionparamspageitemSetresponsebodyrshrrr get_response8s&   zECSConnection.get_responsecKs||d<|d|S)a Returns items that satisfy the search criteria, including one or more search indices. For a full list of search terms, :see: http://docs.amazonwebservices.com/AWSECommerceService/2010-09-01/DG/index.html?ItemSearch.html SearchIndex ItemSearchr>)r search_indexr7rrr item_searchWs zECSConnection.item_searchcKs |d|S)z Returns items that satisfy the lookup query. For a full list of parameters, see: http://s3.amazonaws.com/awsdocs/Associates/2011-08-01/prod-adv-api-dg-2011-08-01.pdf ItemLookuprA)rr7rrr item_lookupbs zECSConnection.item_lookup)NNTNNNNNrrNr NN)rN) __name__ __module__ __qualname____doc__ APIVersionr r r>rCrE __classcell__rrrrrs  r)r)boto.connectionrrboto.exceptionrtimeurllibxml.saxr/ boto.ecs.itemrrrrrrrs