marchex 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/marchex.rb +3 -3
- data/lib/marchex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9501cc44ac568cfe47688abf9cbfce1d9cbb59cf
|
4
|
+
data.tar.gz: 0dbdfb25b9bb04d188106e1a75863a5df3297797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd04b2d5329ec787a2435a6b0791dcea91b26673aa8404262752caaec4e08ae0bfd4bd6768df8aa21dfb3adfa7d9733704201a68882158bd04f01bcb600bd205
|
7
|
+
data.tar.gz: 206494488a249dbf84f13eed03f2d10d37be818c2ff671084b7ba5236880fe61d3f58a96a852f6fc4e0801b7f237b3bbac60ed015b970bc27f6a7d2c03fa1f83
|
data/README.md
CHANGED
@@ -26,8 +26,8 @@ Create a connection using your Marchex account email address and password:
|
|
26
26
|
# @testcon.account_list
|
27
27
|
Retrieves all accounts
|
28
28
|
|
29
|
-
# @testcon.client_ad_list(client_id)
|
30
|
-
Retrieves all ad campaigns for a client account
|
29
|
+
# @testcon.client_ad_list(client_id, status)
|
30
|
+
Retrieves all ad campaigns for a client account. If disabled or active is passed for the status, only those ads will be returned.
|
31
31
|
|
32
32
|
# @testcon.ad_forward_list(campaign_id)
|
33
33
|
Retrieves all forwarding numbers for a single ad campaign
|
data/lib/marchex.rb
CHANGED
@@ -23,10 +23,10 @@ module Marchex
|
|
23
23
|
|
24
24
|
end
|
25
25
|
|
26
|
-
def client_ad_list(client_id)
|
27
|
-
|
26
|
+
def client_ad_list(client_id, status ='')
|
27
|
+
response = parse_json(RestClient.post(@url, {'jsonrpc' => '2.0', 'id' => '1', 'method' => 'ad.list.all', 'params' => [client_id, {'status' => status.downcase}]}.to_json, :content_type => 'application/json', :accept => 'application/json', :Authorization => $auth))
|
28
28
|
|
29
|
-
end
|
29
|
+
end
|
30
30
|
|
31
31
|
def parse_json(response)
|
32
32
|
body = JSON.parse(response.to_str) if response.code == 200
|
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.1
|
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-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|