fuelsdk 0.0.6 → 0.0.7
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.
- data/fuelsdk.gemspec +1 -1
- data/lib/fuelsdk.rb +1 -0
- data/lib/fuelsdk/objects.rb +24 -0
- data/lib/fuelsdk/version.rb +1 -1
- data/samples/sample-get.rb +13 -0
- data/samples/sample_helper.rb +2 -2
- metadata +5 -3
data/fuelsdk.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = []
|
11
11
|
spec.description = %q{Fuel SDK for Ruby}
|
12
12
|
spec.summary = %q{Fuel SDK for Ruby}
|
13
|
-
spec.homepage = "https://
|
13
|
+
spec.homepage = "https://github.com/barberj/FuelSDK-Ruby"
|
14
14
|
spec.license = ""
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
data/lib/fuelsdk.rb
CHANGED
data/lib/fuelsdk/objects.rb
CHANGED
@@ -364,4 +364,28 @@ module FuelSDK
|
|
364
364
|
end
|
365
365
|
end
|
366
366
|
end
|
367
|
+
|
368
|
+
class Get < Objects::Base
|
369
|
+
include Objects::Soap::Read
|
370
|
+
attr_accessor :id
|
371
|
+
|
372
|
+
def initialize client, id, properties, filter
|
373
|
+
self.properties = properties
|
374
|
+
self.filter = filter
|
375
|
+
self.client = client
|
376
|
+
self.id = id
|
377
|
+
end
|
378
|
+
|
379
|
+
def get
|
380
|
+
super id
|
381
|
+
end
|
382
|
+
|
383
|
+
class << self
|
384
|
+
def new client, id, properties=nil, filter=nil
|
385
|
+
o = self.allocate
|
386
|
+
o.send :initialize, client, id, properties, filter
|
387
|
+
return o.get
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
367
391
|
end
|
data/lib/fuelsdk/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'fuelsdk'
|
2
|
+
require_relative 'sample_helper' # contains auth with credentials
|
3
|
+
|
4
|
+
begin
|
5
|
+
client = ET_Client.new auth
|
6
|
+
get = ET_Get.new client, 'Account'
|
7
|
+
p "Results: #{get.results}"
|
8
|
+
raise 'Failure getting Account info' unless get.success?
|
9
|
+
|
10
|
+
rescue => e
|
11
|
+
p "Caught exception: #{e.message}"
|
12
|
+
p e.backtrace
|
13
|
+
end
|
data/samples/sample_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuelsdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-08-
|
13
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- samples/sample-dataextension.rb
|
171
171
|
- samples/sample-email.rb
|
172
172
|
- samples/sample-folder.rb
|
173
|
+
- samples/sample-get.rb
|
173
174
|
- samples/sample-list.rb
|
174
175
|
- samples/sample-list.subscriber.rb
|
175
176
|
- samples/sample-openevent.rb
|
@@ -187,7 +188,7 @@ files:
|
|
187
188
|
- spec/soap_spec.rb
|
188
189
|
- spec/spec_helper.rb
|
189
190
|
- spec/targeting_spec.rb
|
190
|
-
homepage: https://
|
191
|
+
homepage: https://github.com/barberj/FuelSDK-Ruby
|
191
192
|
licenses:
|
192
193
|
- ''
|
193
194
|
post_install_message:
|
@@ -222,6 +223,7 @@ test_files:
|
|
222
223
|
- samples/sample-dataextension.rb
|
223
224
|
- samples/sample-email.rb
|
224
225
|
- samples/sample-folder.rb
|
226
|
+
- samples/sample-get.rb
|
225
227
|
- samples/sample-list.rb
|
226
228
|
- samples/sample-list.subscriber.rb
|
227
229
|
- samples/sample-openevent.rb
|