marchex 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9501cc44ac568cfe47688abf9cbfce1d9cbb59cf
4
- data.tar.gz: 0dbdfb25b9bb04d188106e1a75863a5df3297797
3
+ metadata.gz: 7c89ee89614fab1b6a985eb37b971f989954f7b9
4
+ data.tar.gz: 27589ec7b0eab51744ee03a5a3c28f77c449500c
5
5
  SHA512:
6
- metadata.gz: fd04b2d5329ec787a2435a6b0791dcea91b26673aa8404262752caaec4e08ae0bfd4bd6768df8aa21dfb3adfa7d9733704201a68882158bd04f01bcb600bd205
7
- data.tar.gz: 206494488a249dbf84f13eed03f2d10d37be818c2ff671084b7ba5236880fe61d3f58a96a852f6fc4e0801b7f237b3bbac60ed015b970bc27f6a7d2c03fa1f83
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Marchex
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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-05 00:00:00.000000000 Z
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.4.5
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