yyyc514-campaign_monitor 1.3.2 → 1.3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'campaign_monitor'
4
- s.version = "1.3.2"
4
+ s.version = "1.3.2.1"
5
5
  s.summary = 'Provides access to the Campaign Monitor API.'
6
6
  s.description = <<-EOF
7
7
  A simple wrapper class that provides basic access to the Campaign Monitor API.
@@ -193,17 +193,19 @@ class CampaignMonitor
193
193
  end
194
194
  end
195
195
 
196
- # Calls Campaign.GetSummary. Often you probably should just use Campaign#summary
197
- # It will return true if successful and false if not.
196
+ # Calls Campaign.GetSummary. OYou probably should just use Campaign#summary which caches results
197
+ # It will raise ApiError if an error occurs
198
198
  # Campaign#result will have the result of the API call
199
199
  #
200
200
  # Example
201
201
  # @camp=@client.campaigns.first
202
- # @camp.GetSummary
202
+ # @camp.GetSummary["Clicks"]
203
203
  def GetSummary
204
- @result=Result.new(cm_client.Campaign_GetSummary('CampaignID' => self.id))
205
- @summary=parse_summary(@result.raw) if @result.success?
206
- @result.success?
204
+ handle_response(cm_client.Campaign_GetSummary('CampaignID' => self.id)) do |response|
205
+ @result=Result.new(response)
206
+ @summary=parse_summary(@result.raw)
207
+ end
208
+ @summary
207
209
  end
208
210
 
209
211
  # Convenience method for accessing summary details of a campaign
@@ -37,9 +37,10 @@ class CampaignMonitorTest < Test::Unit::TestCase
37
37
  assert_not_nil @campaign
38
38
  assert_equal 12345, @campaign.id
39
39
  assert_raises( CampaignMonitor::ApiError ) { @campaign.lists }
40
+ assert_raises( CampaignMonitor::ApiError ) { @campaign.GetSummary }
40
41
  end
41
42
 
42
- def test_braket_lookup_for_existing
43
+ def test_bracket_lookup_for_existing
43
44
  camp=CampaignMonitor::Campaign[@campaign.id]
44
45
  assert_not_nil camp
45
46
  camp.lists
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yyyc514-campaign_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Weiskotten