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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f83d479f5729ca4e19bc5f00d7055c6877206e5a
4
- data.tar.gz: 8286b3fa26d623d8b3939d8d1f02eaf0edfdc21f
3
+ metadata.gz: 9501cc44ac568cfe47688abf9cbfce1d9cbb59cf
4
+ data.tar.gz: 0dbdfb25b9bb04d188106e1a75863a5df3297797
5
5
  SHA512:
6
- metadata.gz: 7718c530b7ce8fd0787ce7bd0ef965efe9c66794861ca37ac8d41cc10e283c2c29c3cc321f2897b23bcc4a25a01a9f89da308e927191239b7f18946c379a7f9c
7
- data.tar.gz: 98360232be1ef46b523feb1a3732cd95a2677a00b45ae4009b8ae078103537856542e7e1d9d7228a659d177da11aae9507706cd8cb945a8d98eda8df7e19f3bc
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
@@ -23,10 +23,10 @@ module Marchex
23
23
 
24
24
  end
25
25
 
26
- def client_ad_list(client_id)
27
- response = parse_json(RestClient.post(@url, {'jsonrpc' => '2.0', 'id' => '1', 'method' => 'ad.list.all', 'params' => [client_id, {'status' => 'active'}]}.to_json, :content_type => 'application/json', :accept => 'application/json', :Authorization => $auth))
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
@@ -1,3 +1,3 @@
1
1
  module Marchex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.0
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-06-24 00:00:00.000000000 Z
11
+ date: 2016-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler