marchex 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/marchex.rb +5 -0
- data/lib/marchex/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c89ee89614fab1b6a985eb37b971f989954f7b9
|
4
|
+
data.tar.gz: 27589ec7b0eab51744ee03a5a3c28f77c449500c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de612b0b18a0d8c1049ce6c5c2eedcc69cb225851cfc1eb47ebb72b4d8bc518ce4926790999fa5ac9d5a62d8a72a4f73f87b6c0ef03f03222997e40633b67655
|
7
|
+
data.tar.gz: c83e15c394dea30e47bb84d4ebea7102639feafb88809d224a5a3ba4dedc4cb123c24cbdc9cd110f0be392a0c0c861f342b507431fa3f2245e2db13696ef90e9
|
data/README.md
CHANGED
@@ -42,7 +42,10 @@ Create a connection using your Marchex account email address and password:
|
|
42
42
|
Grab permissions to see if a user is an admin
|
43
43
|
|
44
44
|
# @testcon.ad_custom_define(acc_id,field_number, field_name, field_type, field_values)
|
45
|
-
Define a custom field for an ad
|
45
|
+
Define a custom field for an ad
|
46
|
+
|
47
|
+
# @ad_custom_set(acc_id, campaign_id, field_name, field_value)
|
48
|
+
Set the value of a custom field. For boolean, use yes/no
|
46
49
|
|
47
50
|
## Development
|
48
51
|
|
data/lib/marchex.rb
CHANGED
@@ -55,6 +55,11 @@ module Marchex
|
|
55
55
|
def ad_custom_define(acc_id,field_number, field_name, field_type, field_values)
|
56
56
|
response = parse_json(RestClient.post(@url, {'jsonrpc' => '2.0', 'id' => '1', 'method' => 'ad.custom.define', 'params' => [acc_id,field_number, field_name, field_type, field_values]}.to_json, :content_type => 'application/json', :accept => 'application/json', :Authorization => $auth))
|
57
57
|
return response.body["result"]
|
58
|
+
end
|
59
|
+
|
60
|
+
def ad_custom_set(acc_id, campaign_id, field_name, field_value)
|
61
|
+
response = parse_json(RestClient.post(@url, {'jsonrpc' => '2.0', 'id' => '1', 'method' => 'ad.custom.set', 'params' => [acc_id,campaign_id, field_name, field_value]}.to_json, :content_type => 'application/json', :accept => 'application/json', :Authorization => $auth))
|
62
|
+
return response.body["result"]
|
58
63
|
end
|
59
64
|
|
60
65
|
end
|
data/lib/marchex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marchex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hoskison
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.1
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Used to work with the Marchex API
|