yotpo api integration
Project description
yotpo API
This is a package to integrate and model the data structure and wrap the api calls made to use the yotpo api.
Install
pip install yotpo-api
Usage
Authentication
To use the yotpo api you need to provide your yotpo api key and api secret either by passing them as kwargs to the client init
client = YotpoClient(api_token, api_secret)
either by setting them as env vars named YOTPO_API_TOKEN and YOTPO_API_SECRET so they are automatically used by the client when there kwargs are not provided.
client = YotpoClient()
Getting reviews
client.get_reviews()
optionally providing the product id and the from date params.
Creating reviews
client.create_review(
{
"product_title": "product_title",
"product_url": "https://www.sephora.com/something",
"display_name": "John Doe",
"email": "jone.dow@gmail.com",
"review_content": "the fragrance is good, even thou the texture got worse, anyway, still great value.",
"review_title": "great value",
"review_score": 5,
}
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yotpo-api-0.0.5.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for yotpo_api-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebfc6c7790f57c2f537da5caaf2c46fcf24dc6fd1d4d178d08f2939ca966ce58 |
|
MD5 | cab701c028317d64698edeba55793bc8 |
|
BLAKE2b-256 | bbad18b1702d2707fdb33533a25a80b7310f5cb7310f13346426e375399f34d1 |