Sha256: 315fbb2e02fa3c43413ed04d6ed60678e58da1c674dc2a45149c44e575c73c91
Contents?: true
Size: 980 Bytes
Versions: 4
Compression:
Stored size: 980 Bytes
Contents
module Hominid module Campaign # Find a campaign by id def find_campaign_by_id(campaign_id) campaigns({:campaign_id => campaign_id})['data'] end # Find a campaign by web_id def find_campaign_by_web_id(campaign_web_id) campaigns['data'].find {|c| c["web_id"] == campaign_web_id} end # Find a campaign by name def find_campaigns_by_title(campaign_title, *args) campaigns({:title => campaign_title}, *args)['data'] end # Find campaigns by list name def find_campaigns_by_list_name(list_name, *args) campaigns({:list_id => find_list_id_by_name(list_name)}, *args)['data'] end # Find campaigns by list id def find_campaigns_by_list_id(list_id, *args) campaigns({:list_id => list_id}, *args)['data'] end # Find campaigns by type def find_campaigns_by_type(campaign_type, *args) campaigns({:type => campaign_type}, *args)['data'] end end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
hominid-wout-3.0.6 | lib/hominid/campaign.rb |
hominid-3.0.5 | lib/hominid/campaign.rb |
hominid-3.0.4 | lib/hominid/campaign.rb |
hominid-3.0.2 | lib/hominid/campaign.rb |