示例#1
0
        public async Task <long> AddPrintJob(PrintNodePrintJob job, PrintNodeRequestOptions options = null)
        {
            job.PrinterId = Id;

            var response = await PrintNodeApiHelper.Post("/printjobs", job, options);

            return(JsonConvert.DeserializeObject <long>(response));
        }
示例#2
0
        public async Task <long> Print(PrintNodeRequestOptions options = null)
        {
            if (Printer == null && PrinterId == 0)
            {
                throw new Exception("Printer or PrinterId required");
            }

            var response = await PrintNodeApiHelper.Post("/printjobs", this, options);

            return(JsonConvert.DeserializeObject <long>(response));
        }
        public async Task <PrintNodeChildAccount> CreateAsync(PrintNodeRequestOptions options = null)
        {
            var response = await PrintNodeApiHelper.Post("/account", new
            {
                Account = this,
                ApiKeys,
                Tags
            }, options);

            return(JsonConvert.DeserializeObject <PrintNodeChildAccount>(response, new PrintNodeChildAccountCreationResponseConverter()));
        }