Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTC-2400 - Add due date to content item variant #83

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const response = await client.publishLanguageVariant()
// .byLanguageCodename('es-mx')
// To schedule publish date, use .withData({scheduled_to: 'datetime-to-publish-at'})
.withData({
scheduled_to: '2038-01-19T04:14:08+01:00',
scheduled_to: '2038-01-19T04:14:08',
display_timezone: "Australia/Sydney"
})
// To publish now, use .withoutData()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const response = await client.unpublishLanguageVariant()
.byLanguageCodename('es-mx')
// To schedule unpublish date, use .withData({scheduled_to: 'datetime-to-unpublish-at'})
.withData({
scheduled_to: '2038-01-19T04:14:08+01:00',
scheduled_to: '2038-01-19T04:14:08',
display_timezone: "Australia/Sydney"
})
// To unpublish now, use .withoutData()
Expand Down
4 changes: 4 additions & 0 deletions net/management-api-v2/cm_api_v2_put_variant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
Mode = "autogenerated"
},
},
DueDate = new DueDateModel
{
Value = DateTime.Parse("2024-02-26T06:04:00.7069564Z")
},
new WorkflowStepIdentifier(Reference.ByCodename("default"), Reference.ByCodename("review")))
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
// Scheduled publish
await client.SchedulePublishingOfLanguageVariantAsync(identifier, new ScheduleModel
{
ScheduleTo = DateTime.Parse("2038-01-19T04:14:08+01:00"),
ScheduleTo = DateTime.Parse("2038-01-19T04:14:08"),
DisplayTimeZone = "Australia/Sydney"
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
// Scheduled unpublish
await client.ScheduleUnpublishingOfLanguageVariantAsync(identifier, new ScheduleModel
{
ScheduleTo = DateTime.Parse("2038-01-19T04:14:08+01:00"),
ScheduleTo = DateTime.Parse("2038-01-19T04:14:08"),
DisplayTimeZone = "Australia/Sydney"
});
5 changes: 4 additions & 1 deletion rest/management-api-v2/cm_api_v2_put_variant.curl
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@ curl --request PUT \
},
"mode": "autogenerated"
}
]
],
"due_date": {
"value": "2024-02-26T06:04:00.7069564Z"
}
}'
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ curl --request PUT \
--header 'Content-type: application/json' \
--data '
{
"scheduled_to": "2038-01-19T04:14:08+01:00",
"display_timezone": "Europe/Prague"
"scheduled_to": "2038-01-19T04:14:08",
"display_timezone": "Australia/Sydney"
}'
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ curl --request PUT \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-type: application/json' \
--data '{
"scheduled_to": "2038-01-19T04:14:08+01:00",
"display_timezone": "Europe/Prague"
"scheduled_to": "2038-01-19T04:14:08",
"display_timezone": "Australia/Sydney"
}'
Loading