Comments (5)
What API call are you making?
from openbazaar-go.
https://api.docs.openbazaar.org
I use openbazaar-go v0.14.1 to collect search index. For example, some listings without price presented in this search result also have empty price value through direct API call, but Client v2.4.3 works fine, how is it possible.
from openbazaar-go.
From 0.14.0 and up the pricing values have changed a bit to support ETH style currencies and different divisibilities of currencies. We need to update the API docs.
When scraping listings indexes you will now see this for price
:
"price": {
"amount": "20",
"currency": {
"code": "USD",
"currencyType": "fiat",
"divisibility": 2,
"name": "United States Dollar"
}
},
When scraping an individual listing you will see this:
"item": {
"title": "Casio F91W-1 Classic Resin Strap Digital Sport Watch",
"description": "<p>A tried and true style great for casual wear. With its daily alarm, hourly time signal and auto calendar, you'll never need to worry about missing an appointment again. Black Casual Classic watch with a Resin Band. Accuracy: ± 30 Seconds a month </p>",
"processingTime": "",
"price": 0,
"nsfw": false,
"tags": [
"Clothing, Shoes & Jewelry",
"Men",
"Watches",
"Wrist Watches"
],
"images": [
{
"filename": "1588451376538",
"original": "QmNr9QHTK5A39V3xjnKAsK8MwwMSwW8FMCRSu65sJVbPFY",
"large": "QmZWppsF2ez7FuHmqJJmtqWvt7CLmDeNYF2M4AMhujNeya",
"medium": "QmXRYJpQBcV5iwpvuw5WfALr3YcruKRjGFudqAXT8AE7gT",
"small": "QmdsT79FYUZV2L7hYHajHETPPzwG3wmE6Dv3GVUyM4rSG1",
"tiny": "QmfPmEEMH4EDakV8m1tuLdzUr3SQfp9xxppxW34fsFrR9h"
}
],
"categories": [
"Clothing, Shoes & Jewelry"
],
"grams": 0,
"condition": "",
"options": [
],
"skus": [
{
"productID": "",
"surcharge": 0,
"quantity": 0,
"bigSurcharge": "0",
"bigQuantity": "-1"
}
],
"priceModifier": 0,
"bigPrice": "1069",
"priceCurrency": {
"code": "USD",
"divisibility": 2
}
},
Notice how the legacy price
attribute is 0 now and that bigPrice
is now the value with priceCurrency
describing the currency that was used to price it in.
from openbazaar-go.
Thank you, it works!
from openbazaar-go.
Great
from openbazaar-go.
Related Issues (20)
- Bug (GET /ob/sales): Orders with a state of PENDING or RESOLVED have a zero value for total.amount HOT 1
- How to reduce memory usage
- Switch to Go Modules HOT 2
- Please allow search results to be sorted by origin of shipping HOT 1
- ERROR: create new IPFS node; failed to listen on any address
- compile error:go-multihash is not in GOROOT (/home/linuxbrew/.linuxbrew/Cellar/go/1.14.3/libexec/src/gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash) GoWork/pkg/mod/github.com/!open!bazaar/[email protected]/ipfs/resolve.go:15:2: HOT 1
- Config File is Malformed HOT 7
- Unresolved conflict pushed in Godeps.json
- Server crash due to ticker error
- Server crash due to websocket timeout HOT 9
- Dev docker build is not working HOT 1
- (wrong page)
- no log for debugging?
- No sellers appear under pclos - is there a linux this is known to work in? HOT 2
- no obvious way to start this
- Openbazaar HOT 2
- Is openbazaar still alive? HOT 4
- unable to migrate unknown schema HOT 1
- How can I connect to the server once launched (docker)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openbazaar-go.