Core Utilities¶
Core utilities for Amazon Creators API.
- class amazon_creatorsapi.core.Country¶
Bases:
objectConstants for supported Amazon countries.
Use these constants when specifying the country parameter.
Example
api = AmazonCreatorsApi(…, country=Country.ES)
- AE = 'AE'¶
- AU = 'AU'¶
- BE = 'BE'¶
- BR = 'BR'¶
- CA = 'CA'¶
- DE = 'DE'¶
- ES = 'ES'¶
- FR = 'FR'¶
- IN = 'IN'¶
- IT = 'IT'¶
- JP = 'JP'¶
- MX = 'MX'¶
- NL = 'NL'¶
- PL = 'PL'¶
- SA = 'SA'¶
- SE = 'SE'¶
- SG = 'SG'¶
- TR = 'TR'¶
- UK = 'UK'¶
- US = 'US'¶
- amazon_creatorsapi.core.get_asin(text)¶
Extract the ASIN from a given text or URL.
- Parameters:
text – A string containing an ASIN or Amazon product URL.
- Returns:
The extracted ASIN in uppercase.
- Raises:
InvalidArgumentError – If no valid ASIN can be found in the text.