Skip to content

Latest commit

 

History

History
445 lines (316 loc) · 12.2 KB

File metadata and controls

445 lines (316 loc) · 12.2 KB

Late::QueueApi

All URIs are relative to https://zernio.com/api

Method HTTP request Description
create_queue_slot POST /v1/queue/slots Create schedule
delete_queue_slot DELETE /v1/queue/slots Delete schedule
get_next_queue_slot GET /v1/queue/next-slot Get next available slot
list_queue_slots GET /v1/queue/slots List schedules
preview_queue GET /v1/queue/preview Preview upcoming slots
update_queue_slot PUT /v1/queue/slots Update schedule

create_queue_slot

create_queue_slot(create_queue_slot_request)

Create schedule

Create an additional queue for a profile. The first queue created becomes the default. Subsequent queues are non-default unless explicitly set.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
create_queue_slot_request = Late::CreateQueueSlotRequest.new({profile_id: 'profile_id_example', name: 'name_example', timezone: 'timezone_example', slots: [Late::QueueSlot.new]}) # CreateQueueSlotRequest | 

begin
  # Create schedule
  result = api_instance.create_queue_slot(create_queue_slot_request)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->create_queue_slot: #{e}"
end

Using the create_queue_slot_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> create_queue_slot_with_http_info(create_queue_slot_request)

begin
  # Create schedule
  data, status_code, headers = api_instance.create_queue_slot_with_http_info(create_queue_slot_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <CreateQueueSlot201Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->create_queue_slot_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
create_queue_slot_request CreateQueueSlotRequest

Return type

CreateQueueSlot201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

delete_queue_slot

delete_queue_slot(profile_id, queue_id)

Delete schedule

Delete a queue from a profile. Requires queueId to specify which queue to delete. If deleting the default queue, another queue will be promoted to default.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
profile_id = 'profile_id_example' # String | 
queue_id = 'queue_id_example' # String | Queue ID to delete

begin
  # Delete schedule
  result = api_instance.delete_queue_slot(profile_id, queue_id)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->delete_queue_slot: #{e}"
end

Using the delete_queue_slot_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> delete_queue_slot_with_http_info(profile_id, queue_id)

begin
  # Delete schedule
  data, status_code, headers = api_instance.delete_queue_slot_with_http_info(profile_id, queue_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <DeleteQueueSlot200Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->delete_queue_slot_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
profile_id String
queue_id String Queue ID to delete

Return type

DeleteQueueSlot200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_next_queue_slot

get_next_queue_slot(profile_id, opts)

Get next available slot

Returns the next available queue slot for preview purposes. To create a queue post, use POST /v1/posts with queuedFromProfile instead of scheduledFor.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
profile_id = 'profile_id_example' # String | 
opts = {
  queue_id: 'queue_id_example' # String | Specific queue ID (optional, defaults to profile's default queue)
}

begin
  # Get next available slot
  result = api_instance.get_next_queue_slot(profile_id, opts)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->get_next_queue_slot: #{e}"
end

Using the get_next_queue_slot_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_next_queue_slot_with_http_info(profile_id, opts)

begin
  # Get next available slot
  data, status_code, headers = api_instance.get_next_queue_slot_with_http_info(profile_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <GetNextQueueSlot200Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->get_next_queue_slot_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
profile_id String
queue_id String Specific queue ID (optional, defaults to profile's default queue) [optional]

Return type

GetNextQueueSlot200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

list_queue_slots

list_queue_slots(profile_id, opts)

List schedules

Returns queue schedules for a profile. Use all=true for all queues, or queueId for a specific one. Defaults to the default queue.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
profile_id = 'profile_id_example' # String | Profile ID to get queues for
opts = {
  queue_id: 'queue_id_example', # String | Specific queue ID to retrieve (optional)
  all: 'true' # String | Set to 'true' to list all queues for the profile
}

begin
  # List schedules
  result = api_instance.list_queue_slots(profile_id, opts)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->list_queue_slots: #{e}"
end

Using the list_queue_slots_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> list_queue_slots_with_http_info(profile_id, opts)

begin
  # List schedules
  data, status_code, headers = api_instance.list_queue_slots_with_http_info(profile_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ListQueueSlots200Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->list_queue_slots_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
profile_id String Profile ID to get queues for
queue_id String Specific queue ID to retrieve (optional) [optional]
all String Set to 'true' to list all queues for the profile [optional]

Return type

ListQueueSlots200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

preview_queue

preview_queue(profile_id, opts)

Preview upcoming slots

Returns the next N upcoming queue slot times for a profile as ISO datetime strings.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
profile_id = 'profile_id_example' # String | 
opts = {
  queue_id: 'queue_id_example', # String | Filter by specific queue ID. Omit to use the default queue.
  count: 56 # Integer | 
}

begin
  # Preview upcoming slots
  result = api_instance.preview_queue(profile_id, opts)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->preview_queue: #{e}"
end

Using the preview_queue_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> preview_queue_with_http_info(profile_id, opts)

begin
  # Preview upcoming slots
  data, status_code, headers = api_instance.preview_queue_with_http_info(profile_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <PreviewQueue200Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->preview_queue_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
profile_id String
queue_id String Filter by specific queue ID. Omit to use the default queue. [optional]
count Integer [optional][default to 20]

Return type

PreviewQueue200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

update_queue_slot

update_queue_slot(update_queue_slot_request)

Update schedule

Create a new queue or update an existing one. Without queueId, creates/updates the default queue. With queueId, updates a specific queue. With setAsDefault=true, makes this queue the default for the profile.

Examples

require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
  # Configure Bearer authorization (JWT): bearerAuth
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = Late::QueueApi.new
update_queue_slot_request = Late::UpdateQueueSlotRequest.new({profile_id: 'profile_id_example', timezone: 'timezone_example', slots: [Late::QueueSlot.new]}) # UpdateQueueSlotRequest | 

begin
  # Update schedule
  result = api_instance.update_queue_slot(update_queue_slot_request)
  p result
rescue Late::ApiError => e
  puts "Error when calling QueueApi->update_queue_slot: #{e}"
end

Using the update_queue_slot_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> update_queue_slot_with_http_info(update_queue_slot_request)

begin
  # Update schedule
  data, status_code, headers = api_instance.update_queue_slot_with_http_info(update_queue_slot_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <UpdateQueueSlot200Response>
rescue Late::ApiError => e
  puts "Error when calling QueueApi->update_queue_slot_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
update_queue_slot_request UpdateQueueSlotRequest

Return type

UpdateQueueSlot200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json