markety 1.4.1 → 1.4.2
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.
- checksums.yaml +8 -8
- data/README.md +7 -0
- data/lib/markety/client.rb +21 -18
- data/lib/markety/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDU0YTMyNDk3MmYzZjYxNTk5OGRkZjhhNzg5MGViNTIwMGNmMzY5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzVlOTk5OGQ1ZDUyNjU4Y2UzMmI2N2Q3NTM5ZDBhYzA0YjMzZjA2ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmUxYWM3MTk3NzM5ZDQ3NTE0MmM0MzA5MGFmMzQxYmZiZGU4ODRhYzk3NTZm
|
10
|
+
MDJlOTUxNWZiMjRkMjc0YjlhZDYwODEzMTljYjgwMGQ2ZDMzY2ZmZDM5NGE3
|
11
|
+
ZjUxNWExOGQyZjYxNDYxYzI3M2VmNTljNDcyZDkxOWY3ZDMxOGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjczYTUwYzkxMDhhMTBkZGI0NzcwODI0NThlODQwZGNlNzlmYjNjNGQyMjY3
|
14
|
+
YWNjM2I0NjlmNWQ0YTllNTQ5YWJkMTJlYWIyY2FlZGE1ZThhZWEyN2UyYTdi
|
15
|
+
YjYyOTRjYWM4MTVjNGMzNGZmMmI0YjNhNmQxMGZmN2I0MzgyZjc=
|
data/README.md
CHANGED
@@ -47,3 +47,10 @@ client.remove_from_list('The_List_Name', lead.idnum)
|
|
47
47
|
|
48
48
|
[1] Note that [the Marketo API does not let you create custom fields] (https://community.marketo.com/MarketoDiscussionDetail?id=90650000000PpyEAAS#j_id0:j_id2:j_id9:j_id10:apexideas:j_id248) at this time. In order to set a custom attribute through the API, it must first be added from the Admin interface.
|
49
49
|
_(Admin » Field Management » New Custom Field)_
|
50
|
+
|
51
|
+
## Options
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
# Turn of Savon logging - logging is helpful during development, but outputs a lot of text which you may not want in production
|
55
|
+
client = Markety.new_client(USER_ID, ENCRYPTION_KEY, END_POINT, { log: false })
|
56
|
+
```
|
data/lib/markety/client.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
module Markety
|
2
|
-
def self.new_client(access_key, secret_key, end_point,
|
2
|
+
def self.new_client(access_key, secret_key, end_point, options = {})
|
3
|
+
api_version = options.fetch(:api_version, '2_3')
|
4
|
+
|
3
5
|
client = Savon.client do
|
4
6
|
endpoint end_point
|
5
7
|
wsdl "http://app.marketo.com/soap/mktows/#{api_version}?WSDL"
|
6
8
|
env_namespace "SOAP-ENV"
|
7
9
|
namespaces({"xmlns:ns1" => "http://www.marketo.com/mktows/"})
|
8
10
|
pretty_print_xml true
|
11
|
+
log false if options[:log] == false
|
9
12
|
end
|
10
13
|
|
11
14
|
Client.new(client, Markety::AuthenticationHeader.new(access_key, secret_key))
|
@@ -106,24 +109,24 @@ module Markety
|
|
106
109
|
end
|
107
110
|
|
108
111
|
private
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
112
|
+
|
113
|
+
def list_operation(list_name, list_operation_type, idnum)
|
114
|
+
begin
|
115
|
+
response = send_request(:list_operation, {
|
116
|
+
list_operation: list_operation_type,
|
117
|
+
strict: 'false',
|
118
|
+
list_key: {
|
119
|
+
key_type: 'MKTOLISTNAME',
|
120
|
+
key_value: list_name
|
121
|
+
},
|
122
|
+
list_member_list: {
|
123
|
+
lead_key: [{
|
124
|
+
key_type: 'IDNUM',
|
125
|
+
key_value: idnum
|
126
|
+
}
|
127
|
+
]
|
125
128
|
}
|
126
|
-
)
|
129
|
+
})
|
127
130
|
return response
|
128
131
|
rescue Exception => e
|
129
132
|
@logger.log(e) if @logger
|
data/lib/markety/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markety
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Santoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05
|
11
|
+
date: 2014-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|