wrong class attribute in Search Sheet (Smartsheet API 2.0)

DanSDanS
edited 12/09/19 in API & Developers
04/09/18 Edited 12/09/19

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?

Popular Tags:

Comments

  • Steve WeilSteve Weil Employee

    The sample response shows the raw json data. The Python SDK converts all properties to Python-standard "snake case."

Sign In or Register to comment.