/// <summary> /// Create a new queue through the FreeClimb API using a registered /// FreeClimb application. /// </summary> /// <param name="queueOptions">Optional QueueOptions instance to be used when creating a queue.</param> /// <returns>A Queue object returned by FreeClimb that represents the queue that was created.</returns> /// <exception cref="FreeClimbException">Thrown upon failed request.</exception> /// <see cref="QueueOptions">QueueOptions class.</see> public Queue create(QueueOptions queueOptions = null) { string json = base.POST(this.path, ((queueOptions != null) ? queueOptions.toJson() : null)); if (string.IsNullOrEmpty(json) == true) { throw new FreeClimbException(String.Format("Failed to create queue with options {0}", ((queueOptions != null) ? queueOptions.toJson() : string.Empty))); } return(Queue.fromJson(json)); }
/// <summary> /// Update a single queue. /// </summary> /// <param name="queueId">The queueId of the target queueId.</param> /// <param name="queueOptions">Optional QueueOptions instance to be used when updating a queue.</param> /// <returns>The queue matching the queueId provided.</returns> /// <exception cref="FreeClimbException">Thrown upon failed request.</exception> public Queue update(string queueId, QueueOptions queueOptions = null) { string json = base.POST(String.Format("{0}/{1}", this.path, queueId), ((queueOptions != null) ? queueOptions.toJson() : null)); if (string.IsNullOrEmpty(json) == true) { throw new FreeClimbException(String.Format("Failed to update queue {0} information", queueId ?? "")); } return(Queue.fromJson(json)); }