Module: Campaigning
- Includes:
- ModuleMixin
- Defined in:
- lib/campaigning/list.rb,
lib/campaigning/client.rb,
lib/campaigning/campaign.rb,
lib/campaigning/subscriber.rb,
lib/campaigning/campaigning.rb,
lib/campaigning/module_mixin.rb,
lib/campaigning/soap/generated/default.rb,
lib/campaigning/soap/generated/defaultDriver.rb,
lib/campaigning/soap/generated/defaultMappingRegistry.rb
Defined Under Namespace
Modules: DefaultMappingRegistry, ModuleMixin Classes: AnyType, ApiSoap, ArrayOfCampaign, ArrayOfClient, ArrayOfList, ArrayOfListCustomField, ArrayOfString, ArrayOfSubscriber, ArrayOfSubscriberBounce, ArrayOfSubscriberClick, ArrayOfSubscriberClickedLink, ArrayOfSubscriberCustomField, ArrayOfSubscriberOpen, ArrayOfSubscriberUnsubscribe, Campaign, CampaignCreate, CampaignCreateResponse, CampaignGetBounces, CampaignGetBouncesResponse, CampaignGetLists, CampaignGetListsResponse, CampaignGetOpens, CampaignGetOpensResponse, CampaignGetSubscriberClicks, CampaignGetSubscriberClicksResponse, CampaignGetSummary, CampaignGetSummaryResponse, CampaignGetUnsubscribes, CampaignGetUnsubscribesResponse, CampaignSend, CampaignSendResponse, CampaignSummary, Client, ClientAccessAndBilling, ClientBasicDetails, ClientCreate, ClientCreateResponse, ClientDelete, ClientDeleteResponse, ClientDetail, ClientGetCampaigns, ClientGetCampaignsResponse, ClientGetDetail, ClientGetDetailResponse, ClientGetLists, ClientGetListsResponse, ClientGetSegments, ClientGetSegmentsResponse, ClientGetSuppressionList, ClientGetSuppressionListResponse, ClientUpdateAccessAndBilling, ClientUpdateAccessAndBillingResponse, ClientUpdateBasics, ClientUpdateBasicsResponse, List, ListCreate, ListCreateCustomField, ListCreateCustomFieldResponse, ListCreateResponse, ListCustomField, ListDelete, ListDeleteCustomField, ListDeleteCustomFieldResponse, ListDeleteResponse, ListDetail, ListGetCustomFields, ListGetCustomFieldsResponse, ListGetDetail, ListGetDetailResponse, ListUpdate, ListUpdateResponse, Result, Subscriber, SubscriberAdd, SubscriberAddAndResubscribe, SubscriberAddAndResubscribeResponse, SubscriberAddAndResubscribeWithCustomFields, SubscriberAddAndResubscribeWithCustomFieldsResponse, SubscriberAddResponse, SubscriberAddWithCustomFields, SubscriberAddWithCustomFieldsResponse, SubscriberBounce, SubscriberClick, SubscriberClickedLink, SubscriberCustomField, SubscriberFieldDataType, SubscriberOpen, SubscriberUnsubscribe, SubscriberUnsubscribeResponse, SubscriberUnsubscribe_, SubscribersGetActive, SubscribersGetActiveResponse, SubscribersGetBounced, SubscribersGetBouncedResponse, SubscribersGetIsSubscribed, SubscribersGetIsSubscribedResponse, SubscribersGetSingleSubscriber, SubscribersGetSingleSubscriberResponse, SubscribersGetUnsubscribed, SubscribersGetUnsubscribedResponse, UserGetClients, UserGetClientsResponse, UserGetCountries, UserGetCountriesResponse, UserGetSystemDate, UserGetSystemDateResponse, UserGetTimezones, UserGetTimezonesResponse
Class Method Summary collapse
-
.countries ⇒ Object
This method returns an Array of Strings representing all the available countries.
-
.set_debug_mode(option) ⇒ Object
This method turns the API debug mode to :on and :off, which will display at the console all SOAP requests made to the API server.
- .set_endpoint_url(endpoint_url) ⇒ Object
-
.system_date ⇒ Object
Gets the server system time for your time zone.
-
.timezones ⇒ Object
This method returns an Array of Strings representing all the available timezones.
Methods included from ModuleMixin
Class Method Details
.countries ⇒ Object
This method returns an Array of Strings representing all the available countries.
28 29 30 31 |
# File 'lib/campaigning/campaigning.rb', line 28 def self.countries response = @@soap.getCountries(:apiKey => CAMPAIGN_MONITOR_API_KEY) dateTime = handle_response response.user_GetCountriesResult end |
.set_debug_mode(option) ⇒ Object
This method turns the API debug mode to :on and :off, which will display at the console all SOAP requests made to the API server.
36 37 38 39 |
# File 'lib/campaigning/campaigning.rb', line 36 def self.set_debug_mode(option) option = STDERR if option == :on @@soap.wiredump_dev = option end |
.set_endpoint_url(endpoint_url) ⇒ Object
41 42 43 |
# File 'lib/campaigning/campaigning.rb', line 41 def self.set_endpoint_url(endpoint_url) @@soap = Campaigning::ApiSoap.new(endpoint_url) end |
.system_date ⇒ Object
Gets the server system time for your time zone. This is handy for when you are syncing your Campaign Monitor lists with some other in-house list, allowing you accurately determine the time on our server when you carry out the synchronization.
15 16 17 18 |
# File 'lib/campaigning/campaigning.rb', line 15 def self.system_date response = @@soap.getSystemDate(:apiKey => CAMPAIGN_MONITOR_API_KEY) dateTime = handle_response response.user_GetSystemDateResult end |
.timezones ⇒ Object
This method returns an Array of Strings representing all the available timezones.
22 23 24 |
# File 'lib/campaigning/campaigning.rb', line 22 def self.timezones handle_response @@soap.getTimezones(:apiKey => CAMPAIGN_MONITOR_API_KEY).user_GetTimezonesResult end |