Class: Zype::Zobjects

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

Overview

Since:

  • 0.18.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

#add_videos(id:, video_ids:, type:) ⇒ Hash

Add videos to a Zobject

Parameters:

  • id (String)

    The ID of the Zobject

  • video_ids (Array<String>)

    The IDs of the videos you wish to add

  • type (String)

    The title of the Zobject Type

Returns:

  • (Hash)

    the zobject

Since:

  • 0.18.0



12
13
14
# File 'lib/zype/models/zobjects.rb', line 12

def add_videos(id:, video_ids:, type:)
  client.execute(method: :put, path: "/#{path}/#{id}/add_videos", params: {video_id: video_ids, zobject_type: type})
end