wrong class attribute in Search Sheet (Smartsheet API 2.0)
DanS
✭✭✭✭
Based on the Python documentation of the Search Sheet functionality under Smartsheet API 2.0 (https://smartsheet-platform.github.io/api-docs/index.html?python#search-sheet) I kept getting an error with this code:
response = ss.Search.search_sheet(sheet_id, sys.argv[1])
print(response.totalCount)
It turns out the attribute is not totalCount but total_count.
so this works:
response = ss.Search.search_sheet(sheet_id, sys.argv[1])
print(response.total_count)
Typo error in the API documentation?
Tags:
Comments
-
The sample response shows the raw json data. The Python SDK converts all properties to Python-standard "snake case."
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives