Well, code sample for publish is:
I added a screenshot on purpose so that you will need to retype it and see what IntelliSense does and what overload methods do. :) What is more important is that you know what each of the parameter means.
So to publish an item you need following:
- you need an array of items you want to publish. Here you need to provide an array of IDs. If you publish a single item, you still must cast it to array.
- you need publish instructions. Like when you want it rendered, what you want rendered and when you want it rendered or deployed. Code sample for that is something like:
- You need target where you want something published (publication target, target type or purpose). For understanding this, please check legacy and new publishing models for 8.5. This is normaly staging or live in your case.
- and you need priority (Low, Normal or High)
So please, don't retype the code, try to write it by reading Core Service API. :D