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

GetPublishStatus() public method

Get the Status of the Publish settings of the sheet, including the URLs of any enabled publishings.

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

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 there is any other error during the operation
public GetPublishStatus ( long sheetId ) : Api.Models.SheetPublish
sheetId long the sheetId
return Api.Models.SheetPublish
        public virtual SheetPublish GetPublishStatus(long sheetId)
        {
            return this.GetResource<SheetPublish>("sheets/" + sheetId + "/publish", typeof(SheetPublish));
        }

Usage Example

Example #1
0
        public virtual void TestGetPublishStatus()
        {
            server.setResponseBody("../../../TestSDK/resources/getPublishStatus.json");

            SheetPublish publishStatus = sheetResource.GetPublishStatus(1234L);

            if (publishStatus == null || publishStatus.ReadOnlyFullEnabled != false ||
                publishStatus.IcalEnabled != false || publishStatus.ReadOnlyLiteEnabled != false ||
                publishStatus.ReadWriteEnabled != false)
            {
                Assert.Fail("Issue creating the publish status object");
            }
        }