Uncategorized

etsy-python · PyPI


Response.py The code snippet in Response.py defines a Response class that represents a response from the Etsy API. It includes the response code, message, and optional rate limits. The __str__ method provides a string representation of the response. UserAddress.py This code snippet is part of the etsy-python-sdk repository and is located at etsy_python/v3/resources/UserAddress.py. It provides methods for interacting with user addresses, including deleting an address, getting a specific address, and retrieving a list of addresses. The code relies on the EtsyClient session and makes use of the make_request method. Session.py The Session.py code snippet in the v3/resources directory of the etsy-python-sdk repository implements a EtsyClient class that handles authentication, token management, and making HTTP requests to the Etsy API. It provides methods for updating tokens, making requests, and processing responses. ShopSection.py The ShopSectionResource code snippet is a module within the etsy-python-sdk repository. It provides functions to create, retrieve, update, and delete shop sections in the Etsy API. It utilizes the EtsyClient session to make requests and handles possible exceptions. PaymentLedgerEntry.py This code snippet, located at etsy_python/v3/resources/PaymentLedgerEntry.py, is responsible for handling payment ledger entries in the Etsy Python SDK repository. It provides methods to retrieve specific ledger entries for a shop and to retrieve a list of ledger entries for a shop within a specific time range. The code interacts with the EtsyClient session and returns either a successful Response or a RequestException if an error occurs. User.py The UserResource class in User.py is responsible for retrieving user information from the Etsy API. It utilizes the EtsyClient session to make the API requests and returns a response or an exception. ReceiptTransactions.py The code in ReceiptTransactions.py is responsible for retrieving information about shop receipt transactions from the Etsy API. It provides methods to get transactions related to a listing, a specific receipt, a specific transaction, and all transactions for a shop. The code interacts with the API using the EtsyClient session and handles the request and response handling through the make_request method. ListingOffering.py This code snippet is part of the Etsy Python SDK repository and is located in the ListingOffering.py file. It defines a ListingOfferingResource class that interacts with the Etsy API to retrieve a specific listing offering. It utilizes session and response objects to make the API request. ShopProductionPartner.py The code snippet in ShopProductionPartner.py is a resource class that interacts with the production partners of a shop in the Etsy Python SDK. It provides a method to retrieve the production partners of a shop using the Etsy API. ListingInventory.py The ListingInventory.py code snippet in the etsy-python-sdk repository is responsible for managing listings’ inventory. It provides functions to retrieve and update listing inventory using the Etsy API. It utilizes dataclasses, typing, and other resources from the parent repository. ListingImage.py This code snippet defines a ListingImageResource class in the Etsy Python SDK. It provides methods for interacting with listing images in the Etsy API, such as deleting, getting, and uploading images. The class encapsulates the necessary logic for making requests to the API using the provided EtsyClient session. Shop.py This code snippet in Shop.py defines a ShopResource class that provides methods for interacting with the Etsy API to get, update, find shops, and get shops by owner user ID. It relies on the EtsyClient session to make API requests with appropriate endpoints and parameters. Receipt.py The ReceiptResource code snippet in the Etsy Python SDK repository provides methods for interacting with shop receipts. It allows users to retrieve, update, and create shipments for receipts. This code plays a critical role in managing the receipt-related functionality of the application. ShopReturnPolicy.py This code snippet represents the ShopReturnPolicy resource in the Etsy Python SDK. It provides methods for creating, updating, retrieving, and deleting shop return policies. It communicates with the Etsy API using the EtsyClient session. Taxonomy.py This code snippet contains two classes, BuyerTaxonomy and SellerTaxonomy, which are responsible for making API requests related to buyer and seller taxonomies, respectively. These classes utilize the EtsyClient session object to interact with the API endpoints and retrieve taxonomic data. ListingVariationImages.py This code snippet, located at etsy_python/v3/resources/ListingVariationImages.py, is responsible for handling listing variation images in the Etsy Python SDK. It provides functions to get and update variation images for a listing. The code interacts with the Etsy API through a session and uses dataclasses and typing for proper type annotations. ShippingProfile.py The ShippingProfileResource class in the ShippingProfile.py file is responsible for interacting with the shipping profile endpoints of the Etsy API. It provides methods for creating, updating, deleting, and retrieving shipping profiles and their destinations and upgrades. The class uses the EtsyClient session to make requests to the API. ListingVideo.py This code snippet provides a ListingVideoResource class that interacts with the Etsy API. It allows for deleting, getting, and uploading videos associated with listings. It uses the EtsyClient session for making API requests. ListingProduct.py This code snippet is a resource file in the etsy-python-sdk repository’s v3 package. It provides a method to retrieve a specific product for a listing by making a request to the Etsy API. The code uses dataclasses and types to handle the response and any potential exceptions. ListingTranslation.py This code snippet in ListingTranslation.py provides functions to create, retrieve, and update listing translations in the Etsy Python SDK. It communicates with the Etsy API using the EtsyClient session and handles requests and responses, encapsulating the logic for listing translation operations. ListingFile.py This code snippet in ListingFile.py is part of the etsy-python-sdk repository. It provides functions to interact with listing files in the Etsy API, including deleting, getting, getting all, and uploading listing files. The code relies on the EtsyClient class and various other modules within the repository. Payment.py The PaymentResource class in Payment.py is responsible for handling payments-related operations in the Etsy Python SDK. It provides methods to retrieve shop payment account ledger entries, shop payments by receipt ID, and individual payments by ID. These methods make requests to the Etsy API using the provided session. Review.py The ReviewResource class in the Review.py file is part of the etsy-python-sdk repository. It provides methods to retrieve reviews either by listing or by shop. The class takes a session object as a parameter and uses it to make API requests. Listing.py The code snippet in Listing.py is responsible for managing and interacting with the Listing resource in the Etsy API. It provides functions to create, retrieve, update, and delete listings, as well as perform various operations related to listings, such as getting listings by shop, by IDs, by shop section, and by return policy. The code demonstrates proper resource structuring and implements error handling for making requests to the Etsy API. Miscellaneous.py This code snippet in Miscellaneous.py defines a MiscellaneousResource class that represents a resource for making various API requests. It includes methods for pinging the server and getting token scopes. The class uses a session object to make the requests.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *