Skip to content

Instantly share code, notes, and snippets.

@namachieli
Created March 31, 2022 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save namachieli/7bb0271f415d796744ba47506c76146f to your computer and use it in GitHub Desktop.
Save namachieli/7bb0271f415d796744ba47506c76146f to your computer and use it in GitHub Desktop.
Numista Collections (int) not working
# 1
INFO:2120:2022-03-31T15:08:16-0700:Logger initialized
DEBUG:2120:2022-03-31T15:08:16-0700:Generating a token for our API Key
DEBUG:2120:2022-03-31T15:08:16-0700:No scope provided for _oauth_self(), using defaults : view_collection, edit_collection
DEBUG:2120:2022-03-31T15:08:16-0700:grant_type set to client_credentials
DEBUG:2120:2022-03-31T15:08:16-0700:Validating scope string comma seperated list: view_collection, edit_collection
DEBUG:2120:2022-03-31T15:08:16-0700:valid scopes found: ['view_collection', 'edit_collection']
DEBUG:2120:2022-03-31T15:08:16-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:08:16-0700:Input kwargs: {'scope': 'view_collection,edit_collection', 'state': '', 'grant_type': 'client_credentials'}
DEBUG:2120:2022-03-31T15:08:16-0700:Numista API Path: https://api.numista.com/api/v3/oauth_token
DEBUG:2120:2022-03-31T15:08:16-0700:URI Params: {'scope': 'view_collection,edit_collection', 'grant_type': 'client_credentials'}
DEBUG:2120:2022-03-31T15:08:16-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json'}
DEBUG:2120:2022-03-31T15:08:16-0700:HTTP Method: get
DEBUG:2120:2022-03-31T15:08:16-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:08:16-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:08:16-0700:https://api.numista.com:443 "GET /api/v3/oauth_token?scope=view_collection%2Cedit_collection&grant_type=client_credentials HTTP/1.1" 200 None
DEBUG:2120:2022-03-31T15:08:16-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:08:16-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:08:16-0700:API request succeeded, parsed data: {'access_token': 'a0811b44c9d4e2b3c0708df3564afdbbc35fe462', 'token_type': 'bearer', 'expires_in': 7200, 'user_id': 2...8}
DEBUG:2120:2022-03-31T15:08:16-0700:OAuth request finished with HTTP status 200 & msg: Request successful
DEBUG:2120:2022-03-31T15:08:16-0700:Token generated successfully and expires at 2022-03-31 17:08:15
INFO:2120:2022-03-31T15:08:16-0700:Token with label: self stored in dict(oauthTokens)
INFO:2120:2022-03-31T15:08:16-0700:Numista() has been initialized
# 2
DEBUG:2120:2022-03-31T15:08:56-0700:getUserItems() | Attempting to fetch collected item at endpoint: /users/2...8/collected_items
DEBUG:2120:2022-03-31T15:08:56-0700:User ID: 2...8
DEBUG:2120:2022-03-31T15:08:56-0700:Category:
DEBUG:2120:2022-03-31T15:08:56-0700:Type ID: 0
DEBUG:2120:2022-03-31T15:08:56-0700:Collection ID: 0
DEBUG:2120:2022-03-31T15:08:56-0700:Using Token with Label: self
DEBUG:2120:2022-03-31T15:08:56-0700:KWARGS: {}
DEBUG:2120:2022-03-31T15:08:56-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:08:56-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:08:56-0700:Token found
DEBUG:2120:2022-03-31T15:08:56-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:08:56-0700:Input kwargs: {'category': '', 'type': 0, 'collection': 0}
DEBUG:2120:2022-03-31T15:08:56-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collected_items
DEBUG:2120:2022-03-31T15:08:56-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:08:56-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:08:56-0700:HTTP Method: get
DEBUG:2120:2022-03-31T15:08:56-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:08:56-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:08:56-0700:https://api.numista.com:443 "GET /api/v3/users/2...8/collected_items HTTP/1.1" 200 None
DEBUG:2120:2022-03-31T15:08:56-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:08:56-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:08:56-0700:API request succeeded, parsed data: {'item_count': 1, 'item_for_swap_count': 1, 'item_type_count': 1, 'item_type_for_swap_count': 1, 'items': [{'id': 48243901, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': True, 'grade': 'g', 'collection': {'id': 43708, 'name': 'Misc - US'}, 'pictures': [{'url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64.png', 'thumbnail_url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64-360.png'}]}]}
# 3
DEBUG:2120:2022-03-31T15:09:05-0700:getUserCollections() | Attempting to get collections for user at endpoint: /users/2...8/collections
DEBUG:2120:2022-03-31T15:09:05-0700:User ID: 2...8
DEBUG:2120:2022-03-31T15:09:05-0700:Category:
DEBUG:2120:2022-03-31T15:09:05-0700:Trying Token with Label: self
DEBUG:2120:2022-03-31T15:09:05-0700:KWARGS: {}
DEBUG:2120:2022-03-31T15:09:05-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:09:05-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:09:05-0700:Token found
DEBUG:2120:2022-03-31T15:09:05-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:09:05-0700:Input kwargs: {'category': ''}
DEBUG:2120:2022-03-31T15:09:05-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collections
DEBUG:2120:2022-03-31T15:09:05-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:09:05-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:09:05-0700:HTTP Method: get
DEBUG:2120:2022-03-31T15:09:05-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:09:05-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:09:06-0700:https://api.numista.com:443 "GET /api/v3/users/2...8/collections HTTP/1.1" 200 None
DEBUG:2120:2022-03-31T15:09:06-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:09:06-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:09:06-0700:API request succeeded, parsed data: {'count': 5, 'collections': [{'id': 43709, 'name': 'Misc - Non-US'}, {'id': 43708, 'name': 'Misc - US'}, {'id': 43706, 'name': 'Type - France'}, {'id': 43705, 'name': 'Type - Mexico'}, {'id': 43707, 'name': 'Type - US'}]}
# 4
DEBUG:2120:2022-03-31T15:10:07-0700:Validated body: {'type': 10637, 'issue': 73608, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment', 'collection': 43708}
DEBUG:2120:2022-03-31T15:10:07-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:10:07-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:10:07-0700:Token found
DEBUG:2120:2022-03-31T15:10:07-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:10:07-0700:Input kwargs: {}
DEBUG:2120:2022-03-31T15:10:07-0700:body: {'type': 10637, 'issue': 73608, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment', 'collection': 43708}
DEBUG:2120:2022-03-31T15:10:07-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collected_items
DEBUG:2120:2022-03-31T15:10:07-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:10:07-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:10:07-0700:HTTP Method: post
DEBUG:2120:2022-03-31T15:10:07-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:10:07-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:10:07-0700:https://api.numista.com:443 "POST /api/v3/users/2...8/collected_items HTTP/1.1" 400 None
DEBUG:2120:2022-03-31T15:10:07-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:10:07-0700:API request succeeded, parsed data: {'error_message': 'Invalid collection 43708'}
# 5
DEBUG:2120:2022-03-31T15:10:25-0700:Validated body: {'type': 10637, 'issue': 73608, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}
DEBUG:2120:2022-03-31T15:10:25-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:10:25-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:10:25-0700:Token found
DEBUG:2120:2022-03-31T15:10:25-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:10:25-0700:Input kwargs: {}
DEBUG:2120:2022-03-31T15:10:25-0700:body: {'type': 10637, 'issue': 73608, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}
DEBUG:2120:2022-03-31T15:10:25-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collected_items
DEBUG:2120:2022-03-31T15:10:25-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:10:25-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:10:25-0700:HTTP Method: post
DEBUG:2120:2022-03-31T15:10:25-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:10:25-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:10:26-0700:https://api.numista.com:443 "POST /api/v3/users/2...8/collected_items HTTP/1.1" 201 None
DEBUG:2120:2022-03-31T15:10:26-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:10:26-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:10:26-0700:API request succeeded, parsed data: {'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}
# 6
DEBUG:2120:2022-03-31T15:10:38-0700:getUserItems() | Attempting to fetch collected item at endpoint: /users/2...8/collected_items
DEBUG:2120:2022-03-31T15:10:38-0700:User ID: 2...8
DEBUG:2120:2022-03-31T15:10:38-0700:Category:
DEBUG:2120:2022-03-31T15:10:38-0700:Type ID: 0
DEBUG:2120:2022-03-31T15:10:38-0700:Collection ID: 0
DEBUG:2120:2022-03-31T15:10:38-0700:Using Token with Label: self
DEBUG:2120:2022-03-31T15:10:38-0700:KWARGS: {}
DEBUG:2120:2022-03-31T15:10:38-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:10:38-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:10:38-0700:Token found
DEBUG:2120:2022-03-31T15:10:38-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:10:38-0700:Input kwargs: {'category': '', 'type': 0, 'collection': 0}
DEBUG:2120:2022-03-31T15:10:38-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collected_items
DEBUG:2120:2022-03-31T15:10:38-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:10:38-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:10:38-0700:HTTP Method: get
DEBUG:2120:2022-03-31T15:10:38-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:10:38-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:10:39-0700:https://api.numista.com:443 "GET /api/v3/users/2...8/collected_items HTTP/1.1" 200 None
DEBUG:2120:2022-03-31T15:10:39-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:10:39-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:10:39-0700:API request succeeded, parsed data: {'item_count': 2, 'item_for_swap_count': 1, 'item_type_count': 1, 'item_type_for_swap_count': 1, 'items': [{'id': 48243901, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': True, 'grade': 'g', 'collection': {'id': 43708, 'name': 'Misc - US'}, 'pictures': [{'url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64.png', 'thumbnail_url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64-360.png'}]}, {'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}]}
# 7
DEBUG:2120:2022-03-31T15:11:38-0700:getUserItems() | Attempting to fetch collected item at endpoint: /users/2...8/collected_items
DEBUG:2120:2022-03-31T15:11:38-0700:User ID: 2...8
DEBUG:2120:2022-03-31T15:11:38-0700:Category:
DEBUG:2120:2022-03-31T15:11:38-0700:Type ID: 0
DEBUG:2120:2022-03-31T15:11:38-0700:Collection ID: 0
DEBUG:2120:2022-03-31T15:11:38-0700:Using Token with Label: self
DEBUG:2120:2022-03-31T15:11:38-0700:KWARGS: {}
DEBUG:2120:2022-03-31T15:11:38-0700:Attempting to fetch bearer token with label: self
DEBUG:2120:2022-03-31T15:11:38-0700:Token fetched successfully for self
DEBUG:2120:2022-03-31T15:11:38-0700:Token found
DEBUG:2120:2022-03-31T15:11:38-0700:API endpoint configured for: /v3
DEBUG:2120:2022-03-31T15:11:38-0700:Input kwargs: {'category': '', 'type': 0, 'collection': 0}
DEBUG:2120:2022-03-31T15:11:38-0700:Numista API Path: https://api.numista.com/api/v3/users/2...8/collected_items
DEBUG:2120:2022-03-31T15:11:38-0700:URI Params: {}
DEBUG:2120:2022-03-31T15:11:38-0700:Headers: {'Numista-API-Key': '***ze2x', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer ***e462'}
DEBUG:2120:2022-03-31T15:11:38-0700:HTTP Method: get
DEBUG:2120:2022-03-31T15:11:38-0700:Attempting to send to API
DEBUG:2120:2022-03-31T15:11:38-0700:Starting new HTTPS connection (1): api.numista.com:443
DEBUG:2120:2022-03-31T15:11:38-0700:https://api.numista.com:443 "GET /api/v3/users/2...8/collected_items HTTP/1.1" 200 None
DEBUG:2120:2022-03-31T15:11:38-0700:Completed API Attempt
DEBUG:2120:2022-03-31T15:11:38-0700:Storing raw request in _raw['last_request']
DEBUG:2120:2022-03-31T15:11:38-0700:API request succeeded, parsed data: {'item_count': 2, 'item_for_swap_count': 1, 'item_type_count': 1, 'item_type_for_swap_count': 1, 'items': [{'id': 48243901, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': True, 'grade': 'g', 'collection': {'id': 43708, 'name': 'Misc - US'}, 'pictures': [{'url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64.png', 'thumbnail_url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64-360.png'}]}, {'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar "Capped Bust Half Dollar"', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment', 'collection': {'id': 43708, 'name': 'Misc - US'}}]}
# 1
>>> from numista import Numista
>>> api_key = 'XN...2x'
>>> n=Numista(api_key=api_key, auto_self_token=True, debug=True)
# Define a dummy Coin with a collection
>>> dummy_coin={"type": 10637, "issue": 73608, "grade": "vg", "private_comment": "this is a private comment", "public_comment": "this is a public comment", "collection": 43708 }
# 2
# Get some User Items
>>> items = n.searchUserItems(user_id=n.myUserId())
>>> items
{'data': {'item_count': 1, 'item_for_swap_count': 1, 'item_type_count': 1, 'item_type_for_swap_count': 1, 'items': [{'id': 48243901, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar &quot;Capped Bust Half Dollar&quot;', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': True, 'grade': 'g', 'collection': {'id': 43708, 'name': 'Misc - US'}, 'pictures': [{'url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64.png', 'thumbnail_url': 'https://en.numista.com/vous/pictures/2...8/d2f66bee0e9ec8f0d46aae0934dfa5e6505486c27a9c7ca87922fd23bb2f6d64-360.png'}]}]}, 'http_info': {'http_status': 200, 'http_msg': 'Request successful'}, 'failed': False, 'extra': {'requests': <Response [200]>}}
# Only 1
# 3
# Get collections
>>> collections = n.getUserCollections(user_id=n.myUserId())
>>> collections
{'data': {'count': 5, 'collections': [{'id': 43709, 'name': 'Misc - Non-US'}, {'id': 43708, 'name': 'Misc - US'}, {'id': 43706, 'name': 'Type - France'}, {'id': 43705, 'name': 'Type - Mexico'}, {'id': 43707, 'name': 'Type - US'}]}, 'http_info': {'http_status': 200, 'http_msg': 'Request successful'}, 'failed': False, 'extra': {'requests': <Response [200]>}}
# 4
# Add dummy with Collection id=43708
>>> n.addUserItem(user_id=n.myUserId(), body=dummy_coin)
{'data': {'error_message': 'Invalid collection 43708'}, 'http_info': {'http_status': 400, 'http_msg': 'Invalid parameter or missing mandatory parameter'}, 'failed': False, 'extra': {'requests': <Response [400]>}}
# Fails... but that collection is NOT invalid
# 5
# Dummy coin without collection
>>> dummy_coin={"type": 10637, "issue": 73608, "grade": "vg", "private_comment": "this is a private comment", "public_comment": "this is a public comment"}
>>> n.addUserItem(user_id=n.myUserId(), body=dummy_coin)
{'data': {'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar &quot;Capped Bust Half Dollar&quot;', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}, 'http_info': {'http_status': 201, 'http_msg': 'The requested operation was accepted and successful'}, 'failed': False, 'extra': {'requests': <Response [201]>}}
# Works Fine
# 6
# Search it up to prove it was added
>>> items = n.searchUserItems(user_id=n.myUserId())
>>> items['data']['items'][1]
{'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar &quot;Capped Bust Half Dollar&quot;', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment'}
# 7
# Manually on webgui, add collection 43708, then fetch again
>>> items = n.searchUserItems(user_id=n.myUserId())
>>> items['data']['items'][1]
{'id': 48564729, 'quantity': 1, 'type': {'id': 10637, 'title': '50 Cents / ½ Dollar &quot;Capped Bust Half Dollar&quot;', 'category': 'coin', 'issuer': {'code': 'etats-unis', 'name': 'United States'}}, 'issue': {'id': 73608, 'is_dated': True, 'year': 1833, 'gregorian_year': 1833, 'mintage': 5206000}, 'for_swap': False, 'grade': 'vg', 'private_comment': 'this is a private comment', 'public_comment': 'this is a public comment', 'collection': {'id': 43708, 'name': 'Misc - US'}}
# Manually deleted the coin
# See Screenshots (Inserted) Where i try the same dummy data (with and without collection) on the API GUI Client
# Same Results in same way (Should rule out its not this SDK)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment