ppc 1.0.2 → 1.0.3

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: a4892d8790ca620118a2bc026fcbe41db2ef03b8
4
- data.tar.gz: 8d4a9a875a38e44a54f7ddfbb1da9a2a5f9c7aa2
3
+ metadata.gz: 09a9f14770839f03e5e869f67f10c8aa38556ade
4
+ data.tar.gz: ecac79b3a7462cecfc6975d2eb22d14f9fab2fa5
5
5
  SHA512:
6
- metadata.gz: 5a7d3c33160054e7ad7c23a0b3b03417d43fa8dc883fc523c9b62cd9758194eaad29e3ce70e937ec3974e16957b5d29898c04983b4cb23bf5b297316e5891f81
7
- data.tar.gz: 8425f44467b27e96ef11cd772de22d38426ffdb575e3fe13729be86e620e86a4d8f925df92798020f760475d19d3812f76d0de9ce7cc7092f594a1aeb2174191
6
+ metadata.gz: 9c6aea0f6d8d0cfa10e0d02faf95290e58b57e54b8953de8286ebaa4b15871585bd0459631d27603d29aa929a824243d40bbd6595dff46204546b5bbbf98e770
7
+ data.tar.gz: f56240a8e31892529833312cabffeaffe81339600f5a41c1203af48a87009d56ad4f8f0ec553fa323c54eea00f02c75bb9ec940ab95f9500503e0627e2cde8c9
@@ -0,0 +1,24 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
23
+
24
+ .DS_Store
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ppc.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 charles
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # Ppc
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'ppc'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install ppc
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/ppc/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,19 +1,2 @@
1
- # -*- ruby -*-
1
+ require "bundler/gem_tasks"
2
2
 
3
- require "rubygems"
4
- require "hoe"
5
-
6
- # Hoe.plugin :compiler
7
- # Hoe.plugin :gem_prelude_sucks
8
- # Hoe.plugin :inline
9
- # Hoe.plugin :minitest
10
- # Hoe.plugin :racc
11
- # Hoe.plugin :rcov
12
- # Hoe.plugin :rdoc
13
-
14
- Hoe.spec "ppc" do
15
- developer('seoaqua', "seoaqua@qq.com")
16
- license "MIT"
17
- end
18
-
19
- # vim: syntax=ruby
@@ -0,0 +1,146 @@
1
+ require 'ppc/baidu/account'
2
+ require 'ppc/baidu/plan'
3
+ require 'ppc/baidu/bulk'
4
+ require 'awesome_print'
5
+ require 'savon'
6
+ module PPC
7
+ class Baidu
8
+ include ::PPC
9
+
10
+ def initialize(params = {})
11
+ @service = params[:service] + 'Service'
12
+ @port_name = params[:service] + 'Service'
13
+ @username = params[:username]
14
+ @password = params[:password]
15
+ @token = params[:token]
16
+ @client = Savon.new("https://api.baidu.com/sem/sms/v3/#{@service}?wsdl")
17
+ @debug = params[:debug] || false
18
+ end
19
+
20
+
21
+ def request(method,params = {})
22
+ operation = make_operation(method)
23
+ operation.header = operation_header
24
+ operation.body = {
25
+ method+'Request' =>params
26
+ }
27
+ ap operation.body if @debug
28
+ puts operation.build if @debug
29
+ response = operation.call.hash
30
+ process_response(response)
31
+ ap response if @debug
32
+ response
33
+ end
34
+
35
+
36
+ def operations
37
+ @client.operations(@service,@service)
38
+ end
39
+
40
+ protected
41
+ def download(params = {})
42
+ bulk = ::PPC::Baidu::Bulk.new({
43
+ username: @username,
44
+ password: @password,
45
+ token: @token,
46
+ debug: @debug
47
+ })
48
+
49
+ params[:extended] = params[:extended] || 2
50
+
51
+ begin
52
+ file_id = bulk.file_id_of_all(params)
53
+ puts "file_id: #{file_id}" if @debug
54
+
55
+ loop do
56
+ state = bulk.state(file_id)
57
+ raise "invalid file state: #{state}" unless %w(1 2 3 null).include? state
58
+ break if state == '3'
59
+ puts "waiting for #{file_id} to be ready. current state:#{state}" if @debug
60
+ sleep 3
61
+ end
62
+ puts "#{file_id} is ready" if @debug
63
+ return bulk.path(file_id)
64
+ rescue
65
+ @header = bulk.header
66
+ @oprs = bulk.oprs
67
+ @oprtime = bulk.oprtime
68
+ @quota = bulk.quota
69
+ @rquota = bulk.rquota
70
+ @status = bulk.status
71
+
72
+ @desc = bulk.desc
73
+
74
+ case @desc
75
+ when 'success'
76
+ when 'failure'
77
+ @code = bulk.code
78
+ @message = bulk.message
79
+ when 'system failure'
80
+ @code = bulk.code
81
+ @message = bulk.message
82
+ else
83
+ raise "unknown desc from baidu: #{@desc}"
84
+ end
85
+ end
86
+
87
+ return false
88
+ end
89
+
90
+ private
91
+ def make_operation(operation_name)
92
+ @client.operation(@service,@service,operation_name)
93
+ end
94
+
95
+ def operation_header
96
+ {
97
+ :AuthHeader=>
98
+ {
99
+ username: @username,
100
+ password: @password,
101
+ token: @token
102
+ }
103
+ }
104
+ end
105
+
106
+ def example(operation,with_header=false)
107
+ operation = make_operation(operation)
108
+ if with_header
109
+ {
110
+ example_header: operation.example_header,
111
+ example_body: operation.example_body
112
+ }
113
+ else
114
+ operation.example_body
115
+ end
116
+ end
117
+
118
+ def process_response(response)
119
+ body = response[:envelope]
120
+ @header = body[:header]
121
+ res_header = header[:res_header]
122
+
123
+ @oprs = res_header[:oprs]
124
+ @oprtime = res_header[:oprtime]
125
+ @quota = res_header[:quota]
126
+ @rquota = res_header[:rquota]
127
+ @status = res_header[:status]
128
+
129
+ @desc = res_header[:desc]
130
+ case @desc
131
+ when 'success'
132
+ when 'failure'
133
+ failures = res_header[:failures]
134
+ @code = failures[:code]
135
+ @message = failures[:message]
136
+ when 'system failure'
137
+ failures = res_header[:failures]
138
+ @code = failures[:code]
139
+ @message = failures[:message]
140
+ else
141
+ raise "unknown desc from baidu: #{@desc}"
142
+ end
143
+ end
144
+
145
+ end
146
+ end
@@ -0,0 +1,14 @@
1
+ module PPC
2
+ class Baidu
3
+ class Account < ::PPC::Baidu
4
+ def initialize(params = {})
5
+ params[:service] = 'Account'
6
+ super(params)
7
+ end
8
+
9
+ def all(params = {})
10
+ download(params)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,43 @@
1
+ module PPC
2
+ class Baidu
3
+ class Bulk < ::PPC::Baidu
4
+ def initialize(params = {})
5
+ params[:service] = 'BulkJob'
6
+ super(params)
7
+ end
8
+
9
+ def file_id_of_all(params = {})
10
+ plan_ids = params[:plan_ids]
11
+
12
+ unless plan_ids.nil?
13
+ plan_ids = plan_ids.class == Array ? plan_ids : [plan_ids]
14
+ end
15
+
16
+ options = {
17
+ campaignIds: plan_ids || [] ,
18
+ includeQuality: params[:quality] || true ,
19
+ includeTemp: params[:temp] || false ,
20
+ format: params[:format] || 1 ,
21
+ newCreativeFiles: params[:adcopy] || 0 ,
22
+ includeTempNewCreatives: params[:temp_adcopy] || 0 ,
23
+ includePhraseType: params[:phrase] || 0 ,
24
+ extended: params[:extended] || 0
25
+ }
26
+ response = request('getAllObjects',options)
27
+
28
+ body = response[:envelope][:body]
29
+ raise "no result" if body.nil?
30
+ body[:get_all_objects_response][:file_id]
31
+ end
32
+
33
+ def state(id)
34
+ raise "empty id" if id.nil? or id.empty?
35
+ request('getFileState',{fileId:id})[:envelope][:body][:get_file_state_response][:is_generated]
36
+ end
37
+
38
+ def path(id)
39
+ request('getFilePath',{fileId:id})[:envelope][:body][:get_file_path_response][:file_paths]
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,17 @@
1
+ module PPC
2
+ class Baidu
3
+ class Plan < ::PPC::Baidu
4
+ def initialize(params = {})
5
+ params[:service] = 'Account'
6
+ @se_id = params[:se_id]
7
+ super(params)
8
+ end
9
+
10
+
11
+ def all(params = {})
12
+ params[:plan_ids] = [@se_id]
13
+ download(params)
14
+ end
15
+ end
16
+ end
17
+ end
File without changes
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "ppc"
7
+ spec.version = '1.0.3'
8
+ spec.authors = ["charles"]
9
+ spec.email = ["charles.liu@corp.elong.com"]
10
+ spec.summary = %q{ppc api for google baidu etc}
11
+ spec.description = %q{ppc api for google baidu etc}
12
+ spec.homepage = "http://github.com/seoaqua/ppc"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "rake"
22
+ end
@@ -0,0 +1,16 @@
1
+ describe ::PPC::Baidu::Account do
2
+ subject{::PPC::Baidu::Account.new(
3
+ debug:true,
4
+ username:'',
5
+ password:'',
6
+ token:''
7
+ )}
8
+ it "could download all plan" do
9
+ result = subject.all
10
+ if result
11
+ expect(result.keys).to include :account_file_path
12
+ else
13
+ expect(subject.code).to eq '901162'
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,21 @@
1
+ describe ::PPC::Baidu::Bulk do
2
+ subject{::PPC::Baidu::Bulk.new(
3
+ debug:true,
4
+ username:'',
5
+ password:'',
6
+ token:'')
7
+ }
8
+ it "could get file_id_of_all" do
9
+ begin
10
+ result = subject.file_id_of_all
11
+ rescue
12
+ expect(subject.code).to eq '901162'
13
+ end
14
+
15
+ if result.nil?
16
+ expect(subject.code).to eq '901162'
17
+ else
18
+ expect(result.size).to eq 32
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ describe ::PPC::Baidu::Plan do
2
+ subject{::PPC::Baidu::Plan.new(
3
+ debug:true,
4
+ username:'',
5
+ password:'',
6
+ se_id: '',
7
+ token:''
8
+ )}
9
+ it "could download all plan" do
10
+ result = subject.all
11
+ if result
12
+ expect(result.keys).to include :account_file_path
13
+ else
14
+ expect(subject.code).to eq '901162'
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,81 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
79
+
80
+
81
+ require 'ppc'
metadata CHANGED
@@ -1,71 +1,74 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ppc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - seoaqua
7
+ - charles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-29 00:00:00.000000000 Z
11
+ date: 2014-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rdoc
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
- name: hoe
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.12'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.12'
41
- description: baidu,sogou,qihu sem ppc operations
40
+ version: '0'
41
+ description: ppc api for google baidu etc
42
42
  email:
43
- - seoaqua@qq.com
44
- executables:
45
- - ppc
43
+ - charles.liu@corp.elong.com
44
+ executables: []
46
45
  extensions: []
47
- extra_rdoc_files:
48
- - History.txt
49
- - Manifest.txt
50
- - README.txt
46
+ extra_rdoc_files: []
51
47
  files:
52
- - ".autotest"
53
- - ".gemtest"
54
- - History.txt
55
- - Manifest.txt
56
- - README.txt
48
+ - ".gitignore"
49
+ - ".rspec"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
57
53
  - Rakefile
58
- - bin/ppc
59
54
  - lib/ppc.rb
60
- - test/test_ppc.rb
55
+ - lib/ppc/baidu.rb
56
+ - lib/ppc/baidu/account.rb
57
+ - lib/ppc/baidu/bulk.rb
58
+ - lib/ppc/baidu/plan.rb
59
+ - lib/ppc/qihu.rb
60
+ - lib/ppc/qihu/account.rb
61
+ - ppc.gemspec
62
+ - spec/account_spec.rb
63
+ - spec/bulk_spec.rb
64
+ - spec/plan_spec.rb
65
+ - spec/spec_helper.rb
61
66
  homepage: http://github.com/seoaqua/ppc
62
67
  licenses:
63
68
  - MIT
64
69
  metadata: {}
65
70
  post_install_message:
66
- rdoc_options:
67
- - "--main"
68
- - README.txt
71
+ rdoc_options: []
69
72
  require_paths:
70
73
  - lib
71
74
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -83,6 +86,9 @@ rubyforge_project:
83
86
  rubygems_version: 2.2.2
84
87
  signing_key:
85
88
  specification_version: 4
86
- summary: baidu,sogou,qihu sem ppc operations
89
+ summary: ppc api for google baidu etc
87
90
  test_files:
88
- - test/test_ppc.rb
91
+ - spec/account_spec.rb
92
+ - spec/bulk_spec.rb
93
+ - spec/plan_spec.rb
94
+ - spec/spec_helper.rb
data/.autotest DELETED
@@ -1,25 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require "autotest/restart"
4
-
5
- # Autotest.add_hook :initialize do |at|
6
- # at.testlib = "minitest/unit"
7
- #
8
- # at.extra_files << "../some/external/dependency.rb"
9
- #
10
- # at.libs << ":../some/external"
11
- #
12
- # at.add_exception "vendor"
13
- #
14
- # at.add_mapping(/dependency.rb/) do |f, _|
15
- # at.files_matching(/test_.*rb$/)
16
- # end
17
- #
18
- # %w(TestA TestB).each do |klass|
19
- # at.extra_class_map[klass] = "test/test_misc.rb"
20
- # end
21
- # end
22
-
23
- # Autotest.add_hook :run_command do |at|
24
- # system "rake build"
25
- # end
@@ -1,6 +0,0 @@
1
- === 1.0.0 / 2014-07-28
2
-
3
- * 1 major enhancement
4
-
5
- * Birthday!
6
-
@@ -1,8 +0,0 @@
1
- .autotest
2
- History.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- bin/ppc
7
- lib/ppc.rb
8
- test/test_ppc.rb
data/README.txt DELETED
@@ -1,80 +0,0 @@
1
- = ppc
2
-
3
- home :: http://github.com/seoaqua/ppc
4
- code :: http://github.com/seoaqua/ppc
5
- rdoc :: http://github.com/seoaqua/ppc
6
- bugs :: http://github.com/seoaqua/ppc
7
-
8
- == DESCRIPTION:
9
-
10
- baidu,sogou,qihu sem ppc operations
11
-
12
- == FEATURES/PROBLEMS:
13
-
14
-
15
- == SYNOPSIS:
16
-
17
- ```ruby
18
- config = {
19
- debug:true, #非必选
20
- username:'username',
21
- password:'password',
22
- token:'token'
23
- }
24
-
25
- account = ::PPC::Baidu::Account.new(config)
26
- file_paths = accout.all(key1:'value',key2:'value')
27
-
28
- ```
29
- file_paths 返回结果:
30
- ```
31
- :account_file_path => "https://apidata.baidu.com/data/v2/getFile.do?t=1406621432&u=6680971&i=38ca6fa41dfa25c1b64b0f89d261d32e&f=WAD%2F2014-07-29%2F6680%2F971%2Faccount-20140729-150315-38ca6fa41dfa25c1b64b0f89d261d32e.gz&h=200&s=3c7200683df0ee008bda4b3ddc16a92d",
32
- :campaign_file_path => "https://apidata.baidu.com/data/v2/getFile.do?t=1406621432&u=6680971&i=38ca6fa41dfa25c1b64b0f89d261d32e&f=WAD%2F2014-07-29%2F6680%2F971%2Fcampaign-20140729-150315-38ca6fa41dfa25c1b64b0f89d261d32e.gz&h=200&s=c1ccdb9ab541b04f0400aef0f2199069",
33
- :adgroup_file_path => "https://apidata.baidu.com/data/v2/getFile.do?t=1406621432&u=6680971&i=38ca6fa41dfa25c1b64b0f89d261d32e&f=WAD%2F2014-07-29%2F6680%2F971%2Fadgroup-20140729-150315-38ca6fa41dfa25c1b64b0f89d261d32e.gz&h=200&s=e029e905b7455b5a01290dcb2457c036",
34
- :keyword_file_path => "https://apidata.baidu.com/data/v2/getFile.do?t=1406621432&u=6680971&i=38ca6fa41dfa25c1b64b0f89d261d32e&f=WAD%2F2014-07-29%2F6680%2F971%2Fkeyword-20140729-150315-38ca6fa41dfa25c1b64b0f89d261d32e.gz&h=200&s=9facf7fcb52ab6e6c5c5c6de7de128e6",
35
- :creative_file_path => "https://apidata.baidu.com/data/v2/getFile.do?t=1406621432&u=6680971&i=38ca6fa41dfa25c1b64b0f89d261d32e&f=WAD%2F2014-07-29%2F6680%2F971%2Fcreative-20140729-150315-38ca6fa41dfa25c1b64b0f89d261d32e.gz&h=200&s=182d706d432b1eeaef88070441a2b11a",
36
- :account_file_md5 => "761d3367e4bf1e5489f35d63f476bc38",
37
- :campaign_file_md5 => "ee2bf77e9c115cf75d6321b6ff41a027",
38
- :adgroup_file_md5 => "ee4538aad553d97605982e3fc2fc59bb",
39
- :keyword_file_md5 => "9df8593259bb1ad3764143d3485a07ee",
40
- :creative_file_md5 => "78cc3f8e8c8b0bfc75b362315ca10ba0"
41
- ```
42
- == REQUIREMENTS:
43
-
44
-
45
- == INSTALL:
46
-
47
-
48
- == DEVELOPERS:
49
-
50
- After checking out the source, run:
51
-
52
- $ rake newb
53
-
54
- This task will install any missing dependencies, run the tests/specs,
55
- and generate the RDoc.
56
-
57
- == LICENSE:
58
-
59
- (The MIT License)
60
-
61
- Copyright (c) 2014 FIX
62
-
63
- Permission is hereby granted, free of charge, to any person obtaining
64
- a copy of this software and associated documentation files (the
65
- 'Software'), to deal in the Software without restriction, including
66
- without limitation the rights to use, copy, modify, merge, publish,
67
- distribute, sublicense, and/or sell copies of the Software, and to
68
- permit persons to whom the Software is furnished to do so, subject to
69
- the following conditions:
70
-
71
- The above copyright notice and this permission notice shall be
72
- included in all copies or substantial portions of the Software.
73
-
74
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
75
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
76
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
77
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
78
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
79
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
80
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bin/ppc DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- abort "you need to write me"