Module: Adparlor::Facebook::GraphApi::Traits::Methods
- Included in:
- Activity, Ad, AdAccount, AdCreative, AdImage, AdLabel, AdPreview, AdSet, AdVideo, AdsPixel, AdsPixelStat, AdvertisableApplication, AppEventType, Application, BroadTargetingCategory, Campaign, ConnectionObject, CustomAudience, CustomAudienceTos, CustomAudienceUser, CustomConversion, DeliveryEstimate, Insight, InstagramAccount, Page, PageAndPlace, PartnerCategory, Picture, Post, ProductAudience, ProductCatalog, ProductFeed, ProductGroup, ProductItem, ProductSet, ReachEstimate, ReachFrequencyPrediction, Adparlor::Facebook::GraphApi::TargetingSentenceLine, Adparlor::Facebook::GraphApi::TargetingSuggestion, Adparlor::Facebook::GraphApi::TargetingValidation, User, UserLeadGenInfo, VideoThumbnail
- Defined in:
- lib/adparlor/facebook/graph_api/traits/methods.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #create(attributes = {}, options = {}) ⇒ Object
- #destroy(path, options = {}) ⇒ Object
- #update(attributes = {}, options = {}) ⇒ Object
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 6 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#create(attributes = {}, options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 10 def create(attributes = {}, = {}) allowed_methods = self.class.allowed_methods raise FbError.new('create not available', 500) unless allowed_methods && allowed_methods.include?(:create) super(attributes, ) end |
#destroy(path, options = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 16 def destroy(path, = {}) allowed_methods = self.class.allowed_methods raise FbError.new('destroy not available', 500) unless allowed_methods && allowed_methods.include?(:destroy) super(path, ) end |
#update(attributes = {}, options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 22 def update(attributes = {}, = {}) allowed_methods = self.class.allowed_methods raise FbError.new('update not available', 500) unless allowed_methods && allowed_methods.include?(:update) super(attributes, ) end |