Class: FacebookAds::AdImage

Inherits:
Base
  • Object
show all
Defined in:
lib/facebook_ads/ad_image.rb

Overview

An image will always produce the same hash. developers.facebook.com/docs/marketing-api/reference/ad-image

Constant Summary collapse

FIELDS =
%w[id hash account_id name permalink_url original_width original_height].freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, delete, find_by, get, paginate, post, #save

Class Method Details

.find(_id) ⇒ Object

Raises:

  • (Exception)


10
11
12
# File 'lib/facebook_ads/ad_image.rb', line 10

def find(_id)
  raise Exception, 'NOT IMPLEMENTED'
end

Instance Method Details

#destroyObject



27
28
29
# File 'lib/facebook_ads/ad_image.rb', line 27

def destroy
  super(path: "/act_#{}/adimages", query: { hash: self[:hash] })
end

#hashObject



19
20
21
# File 'lib/facebook_ads/ad_image.rb', line 19

def hash
  self[:hash]
end

#update(_data) ⇒ Object

Raises:

  • (Exception)


23
24
25
# File 'lib/facebook_ads/ad_image.rb', line 23

def update(_data)
  raise Exception, 'NOT IMPLEMENTED'
end