Class: ActiveCampaign::Client
- Extended by:
- Forwardable
- Defined in:
- lib/active_campaign/client.rb,
lib/active_campaign/client/deals.rb,
lib/active_campaign/client/forms.rb,
lib/active_campaign/client/lists.rb,
lib/active_campaign/client/users.rb,
lib/active_campaign/client/groups.rb,
lib/active_campaign/client/tracks.rb,
lib/active_campaign/client/contacts.rb,
lib/active_campaign/client/messages.rb,
lib/active_campaign/client/campaigns.rb
Defined Under Namespace
Modules: Campaigns, Contacts, Deals, Forms, Groups, Lists, Messages, Tracks, Users
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#get(api_method, options = {}) ⇒ Hash
Make a HTTP GET request.
- #hash ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
-
#post(api_method, options = {}) ⇒ Hash
Make a HTTP POST request.
Methods included from Users
#user_add, #user_delete, #user_delete_list, #user_edit, #user_list, #user_me, #user_view, #user_view_email, #user_view_username
Methods included from Tracks
#track_event_add, #track_event_delete, #track_event_list, #track_event_status_edit, #track_site_list, #track_site_status_edit, #track_site_whitelist_add, #track_site_whitelist_delete
Methods included from Messages
#message_add, #message_delete, #message_delete_list, #message_edit, #message_list, #message_template_add, #message_template_delete, #message_template_delete_list, #message_template_edit, #message_template_export, #message_template_import, #message_template_list, #message_template_view, #message_view
Methods included from Lists
#list_add, #list_delete, #list_delete_list, #list_edit, #list_field_add, #list_field_delete, #list_field_edit, #list_field_view, #list_list, #list_paginator, #list_view
Methods included from Groups
#group_add, #group_delete, #group_delete_list, #group_edit, #group_list, #group_view
Methods included from Forms
Methods included from Deals
#deal_add, #deal_delete, #deal_edit, #deal_get, #deal_list, #deal_note_add, #deal_note_edit, #deal_pipeline_add, #deal_pipeline_delete, #deal_pipeline_edit, #deal_pipeline_list, #deal_stage_add, #deal_stage_delete, #deal_stage_edit, #deal_stage_list, #deal_task_add, #deal_task_edit, #deal_tasktype_add, #deal_tasktype_delete, #deal_tasktype_edit
Methods included from Contacts
#automation_contact_remove, #contact_add, #contact_automation_list, #contact_delete, #contact_delete_list, #contact_edit, #contact_list, #contact_note_add, #contact_note_delete, #contact_note_edit, #contact_paginator, #contact_sync, #contact_tag_add, #contact_tag_remove, #contact_view, #contact_view_email, #contact_view_hash
Methods included from Campaigns
#campaign_create, #campaign_delete, #campaign_delete_list, #campaign_edit, #campaign_list, #campaign_paginator, #campaign_report_bounce_list, #campaign_report_bounce_totals, #campaign_report_forward_list, #campaign_report_forward_totals, #campaign_report_link_list, #campaign_report_link_totals, #campaign_report_open_list, #campaign_report_open_totals, #campaign_report_totals, #campaign_report_unopen_list, #campaign_report_unsubscription_list, #campaign_report_unsubscription_totals, #campaign_send, #campaign_status
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
33 34 35 |
# File 'lib/active_campaign/client.rb', line 33 def initialize( = {}) @config = ActiveCampaign.config.dup.merge() end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
29 30 31 |
# File 'lib/active_campaign/client.rb', line 29 def config @config end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
59 60 61 62 |
# File 'lib/active_campaign/client.rb', line 59 def ==(other) other.is_a?(ActiveCampaign::Client) && hash == other.hash end |
#get(api_method, options = {}) ⇒ Hash
Make a HTTP GET request
42 43 44 |
# File 'lib/active_campaign/client.rb', line 42 def get(api_method, = {}) request :get, api_method, end |
#hash ⇒ Object
55 56 57 |
# File 'lib/active_campaign/client.rb', line 55 def hash [config.hash, Client].hash end |
#post(api_method, options = {}) ⇒ Hash
Make a HTTP POST request
51 52 53 |
# File 'lib/active_campaign/client.rb', line 51 def post(api_method, = {}) request :post, api_method, end |