Smartsheet.Api.Internal.SheetResourcesImpl.GetSheetVersion C# (CSharp) Method

GetSheetVersion() public method

Gets the Sheet version without loading the entire Sheet.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/version

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetSheetVersion ( long sheetId ) : int?
sheetId long the sheetId
return int?
        public virtual int? GetSheetVersion(long sheetId)
        {
            return this.GetResource<Sheet>("sheets/" + sheetId + "/version", typeof(Sheet)).Version;
        }

Usage Example

Example #1
0
        public virtual void TestGetSheetVersion()
        {
            server.setResponseBody("../../../TestSDK/resources/getSheetVersion.json");
            int?version = sheetResource.GetSheetVersion(1234L);

            if (version != 1)
            {
                Assert.Fail("Issue getting sheet version");
            }
        }