Class: Zype::LiveEvents

Inherits:
BaseModel show all
Defined in:
lib/zype/models/live_events.rb

Overview

Since:

  • 0.1.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client, #path

Instance Method Summary collapse

Methods inherited from BaseModel

#all, #auth=, #create, #delete, #find, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#archive(id:) ⇒ Hash

Archives the live event

Parameters:

  • id (String)

    the ID of the live event

Returns:

  • (Hash)

    the live event

Since:

  • 0.1.0



26
27
28
# File 'lib/zype/models/live_events.rb', line 26

def archive(id:)
  client.execute(method: :put, path: "/live_events/#{id}/archive")
end

#start(id:) ⇒ Hash

Starts broadcasting a live event

Parameters:

  • id (String)

    the ID of the live event

Returns:

  • (Hash)

    the live event

Since:

  • 0.1.0



10
11
12
# File 'lib/zype/models/live_events.rb', line 10

def start(id:)
  client.execute(method: :put, path: "/live_events/#{id}/start")
end

#stop(id:) ⇒ Hash

Stops broadcasting a live event

Parameters:

  • id (String)

    the ID of the live event

Returns:

  • (Hash)

    the live event

Since:

  • 0.1.0



18
19
20
# File 'lib/zype/models/live_events.rb', line 18

def stop(id:)
  client.execute(method: :put, path: "/live_events/#{id}/stop")
end