API access to Custom Fields #166
-
I have added two Custom Fields to my Discogs collection. These are "Shelf" and "Position." (Note that these correspond to data that is collected by an app called "Record Scanner." I do not work for them by the way.) These fields are working properly within Discogs. If I export my collection, they appear.
However, I can't figure out how to access Shelf and Position. There is an API function to “List Custom Fields" but I can't figure out where, or if, it exists in this package. Eventually, I will want to import my 2000+ records from Record Scanner into my Discogs Collection (Not Inventory. I don't want to sell anything through Discogs for now.) Full disclosure: I have sent questions to Discogs support as well as the Record Scanner folks, but since I don't know where the problem is coming from, I wanted to add in the Discogs_Client community. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
This object contains them in the |
Beta Was this translation helpful? Give feedback.
-
Ah, the magic of other people's databases! Rather than set up to use curl (being Windows and having to learn more coding than I want to.), I ran the same code as above today and the results are different. Maybe weird updating processes overnight at Discogs. To sort of simplify, I took the endpoint as in the API and used a requests.get and some JSON-y stuff. Here is the code:
And the results are:
Lo and behold, my 2 custom fields are now showing up as fields 4 and 5 in "Notes." I am also able to write to those fields and it shows up in my collection on Discogs. You really have to burrow deeply in the URL to get to a specific Notes field.
So in the end, I think I answered my own questions. Do you agree? |
Beta Was this translation helpful? Give feedback.
This object contains them in the
notes
property, it returns a list of dictionaries with all your custom fields if I'm not mistaken: https://python3-discogs-client.readthedocs.io/en/latest/discogs_client.models.html#discogs_client.models.CollectionItemInstance