apple_reporter 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/.travis.yml +5 -1
- data/README.md +26 -6
- data/apple_reporter.gemspec +4 -4
- data/lib/apple_reporter/reporter.rb +3 -7
- data/lib/apple_reporter/version.rb +1 -1
- data/lib/apple_reporter.rb +0 -1
- metadata +11 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c82a9ab7160e26915d707cec45a49cad19b46b
|
4
|
+
data.tar.gz: af5a954291002b2b146f0738b711ccd7b56b2414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ab80b99698c99c70e619aaee1686d803f4900e5fda8a1b2fcce6d1c407360b0324eb0a373965f9dca5b570fd9822fb1ec48c3e0eb43e3bc085d48c52123433
|
7
|
+
data.tar.gz: fbac9754167a88c216fedbbfa0f7a082cff87cc124945ed5998e4b388c6e999f2e3926d1f51063e7655bee7f89ee2944713a0e3db5a3aacf0c4361709da836dd
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# AppleReporter
|
2
2
|
|
3
|
+
[![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/apple_reporter?type=total)](https://rubygems.org/gems/apple_reporter)
|
4
|
+
[![Build Status](https://travis-ci.org/iscreen/apple_reporter.svg?branch=master)](https://travis-ci.org/iscreen/apple_reporter)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/iscreen/apple_reporter.svg)](https://codeclimate.com/github/iscreen/apple_reporter)
|
6
|
+
[![Inline docs](https://inch-ci.org/github/iscreen/apple_reporter.svg?branch=master)](http://www.rubydoc.info/gems/apple_reporter)
|
7
|
+
|
8
|
+
|
3
9
|
This is Ruby Version <b>iTunes Connect Reporter</b>
|
4
10
|
|
5
11
|
## Installation
|
@@ -20,27 +26,41 @@ Or install it yourself as:
|
|
20
26
|
|
21
27
|
## Usage
|
22
28
|
|
23
|
-
|
24
29
|
### Sales
|
25
30
|
|
26
31
|
- getReport
|
27
32
|
|
28
33
|
```
|
29
|
-
reporter = AppleReporter::Sale.new(user_id: '
|
34
|
+
reporter = AppleReporter::Sale.new(user_id: 'your user id', password: 'your password')
|
30
35
|
report = reporter.getReport(
|
31
|
-
|
32
|
-
vendor_number: '
|
36
|
+
{
|
37
|
+
vendor_number: 'your vender id',
|
33
38
|
report_type: 'Sales',
|
34
39
|
report_sub_type: 'Summary',
|
35
40
|
date_type: 'Daily',
|
36
41
|
date: '20161212'
|
37
|
-
|
42
|
+
}
|
43
|
+
)
|
44
|
+
```
|
45
|
+
### Finance
|
46
|
+
|
47
|
+
- getReport
|
48
|
+
```
|
49
|
+
reporter = AppleReporter::Finance.new(user_id: 'your user id', password: 'your password')
|
50
|
+
report = reporter.getReport(
|
51
|
+
{
|
52
|
+
vendor_number: 'your vender id',
|
53
|
+
region_code: 'US',
|
54
|
+
report_type: 'Financial',
|
55
|
+
fiscal_year: '2016',
|
56
|
+
fiscal_period: '02'
|
57
|
+
}
|
38
58
|
)
|
39
59
|
```
|
40
60
|
|
41
61
|
## Development
|
42
62
|
|
43
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `
|
63
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
64
|
|
45
65
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
46
66
|
|
data/apple_reporter.gemspec
CHANGED
@@ -30,13 +30,13 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ['lib']
|
32
32
|
|
33
|
-
spec.add_dependency('nokogiri')
|
34
|
-
spec.add_dependency('activesupport')
|
35
33
|
spec.add_dependency('rest-client')
|
36
34
|
|
37
|
-
spec.
|
35
|
+
spec.add_runtime_dependency 'activesupport', '~> 4.0', '>= 0'
|
36
|
+
|
37
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
38
38
|
spec.add_development_dependency 'rake', '~> 10.0'
|
39
39
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
40
40
|
spec.add_development_dependency 'webmock', '~> 2.3'
|
41
|
-
|
41
|
+
|
42
42
|
end
|
@@ -44,17 +44,13 @@ module AppleReporter
|
|
44
44
|
gz = Zlib::GzipReader.new(io)
|
45
45
|
return gz.readlines.join
|
46
46
|
else
|
47
|
-
|
48
|
-
return Hash.from_xml(doc.to_s)
|
47
|
+
return Hash.from_xml(response.body)
|
49
48
|
end
|
50
49
|
end
|
51
50
|
|
52
|
-
if mode == 'Robot.XML'
|
53
|
-
doc = Nokogiri::XML(response.body)
|
54
|
-
return Hash.from_xml(doc.to_s)
|
55
|
-
end
|
51
|
+
return Hash.from_xml(response.body) if mode == 'Robot.XML'
|
56
52
|
|
57
|
-
|
53
|
+
response.body
|
58
54
|
end
|
59
55
|
end
|
60
56
|
end
|
data/lib/apple_reporter.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apple_reporter
|
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
|
- Dean Lin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -28,20 +28,9 @@ dependencies:
|
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
31
|
+
- - "~>"
|
39
32
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rest-client
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
33
|
+
version: '4.0'
|
45
34
|
- - ">="
|
46
35
|
- !ruby/object:Gem::Version
|
47
36
|
version: '0'
|
@@ -49,6 +38,9 @@ dependencies:
|
|
49
38
|
prerelease: false
|
50
39
|
version_requirements: !ruby/object:Gem::Requirement
|
51
40
|
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '4.0'
|
52
44
|
- - ">="
|
53
45
|
- !ruby/object:Gem::Version
|
54
46
|
version: '0'
|
@@ -58,14 +50,14 @@ dependencies:
|
|
58
50
|
requirements:
|
59
51
|
- - "~>"
|
60
52
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
53
|
+
version: '1.11'
|
62
54
|
type: :development
|
63
55
|
prerelease: false
|
64
56
|
version_requirements: !ruby/object:Gem::Requirement
|
65
57
|
requirements:
|
66
58
|
- - "~>"
|
67
59
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
60
|
+
version: '1.11'
|
69
61
|
- !ruby/object:Gem::Dependency
|
70
62
|
name: rake
|
71
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +100,6 @@ dependencies:
|
|
108
100
|
- - "~>"
|
109
101
|
- !ruby/object:Gem::Version
|
110
102
|
version: '2.3'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: activesupport
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '4.0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '4.0'
|
125
103
|
description: Apple iTunes Connect Reporter
|
126
104
|
email:
|
127
105
|
- iscreen@gmail.com
|
@@ -167,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
145
|
version: '0'
|
168
146
|
requirements: []
|
169
147
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.6.4
|
171
149
|
signing_key:
|
172
150
|
specification_version: 4
|
173
151
|
summary: Apple iTunes Connect Reporter
|