ireporter 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: 997fee57d686d48ad5e8a7042f24c9872f13cf22
4
- data.tar.gz: f6f6c484623f3f596bbed8c1a29af8e3f6bd9b85
3
+ metadata.gz: 4c20531966b2b5e415685ac177e7a9cbc3cd57e5
4
+ data.tar.gz: 5f14ef0b4284904e24b862d2d69c9a43661dad1b
5
5
  SHA512:
6
- metadata.gz: bece219ed2412aab7e7ad6ae3ad8d697e37d7af624a1a8990217aeb091d97e008446f4885020ffefb09f2496c138bed930dd5f0b132b90a0f53d30a63fe90bb7
7
- data.tar.gz: a2763a73efcfef4fb8cc14a7097e5fec5aff67bf7972f3e2bb3ba8cb900bc8a1f0b74a12578466ea17e1a4a726115f12142bb99d5d17bf6565ad1b3cb70fbf4e
6
+ metadata.gz: 4977c30230756d712ad0a007643876fd51c0d529e4d6d26f3e279dc1fb6b1a75009462b6a72a3a566a78299a32b82db882db33a1e259abd791cc83fbc9ce1a7c
7
+ data.tar.gz: '039852ad5461bc8ad0fd8f8e06a2ccaa283f9c573aa84475e6b9908b0bfc6e2e9bf58f0925842158c549071c8b5b22de5dfcf8c243999ad111dce02ea6c14804'
data/README.md CHANGED
@@ -1,17 +1,22 @@
1
- # Ireporter
1
+ # Ireporter ![](http://ruby-gem-downloads-badge.herokuapp.com/ireporter?type=total)
2
2
 
3
- This gem is the Ruby alternative to **iTunes Connect Reporter** written in java library used to fetch sales and finance reports.
3
+ Ireporter is an Ruby alternative to **iTunes Connect Reporter** a java library provided by Apple, which is used to fetch sales and finance reports.
4
+ Ireporter takes username and password for iTunes Connector and makes JSON request to get the response from ITC, unlike Apple's Reporter Ireporter removes the overhead of unzipping the archive file to get the data form text file, instead it gives the data in string data type, which can be wrapped into Array of hashses using Ireporter's wrap method. Later on can be converted in to JSON and other formats using ruby methods for conversion as per convenience.
4
5
 
5
6
  This gem is written considering requirement of Rails app, but can be used as a regular ruby gem.
6
7
 
7
8
 
9
+ Currently Ireporter allows to fetch the status of Sales and Finance reports, fetch the vendor number and extracts the sales reports.
10
+ We are still working on extracting Financial report feature and will be added in next release.
11
+
12
+
8
13
 
9
14
  ## Installation
10
15
 
11
16
  Add this line to your application's Gemfile:
12
17
 
13
18
  ```ruby
14
- gem 'ireporter'
19
+ gem 'ireporter', '~> 0.1.2'
15
20
  ```
16
21
 
17
22
  And then execute:
@@ -27,7 +32,12 @@ Or install it yourself as:
27
32
  Create a reporter object
28
33
 
29
34
  ```
30
- reporterObj= Ireporter::Reporter.new('user id','password')
35
+ require 'ireporter'
36
+
37
+ include Ireporter
38
+
39
+ reporterObj= Reporter.new('user id','password')
40
+
31
41
  ```
32
42
 
33
43
  And use below awesome methods, and see the Magic happen.
@@ -43,7 +53,17 @@ reporterObj.get_status('Finance')
43
53
  Fetch the sales report
44
54
 
45
55
  ```
46
- report_data=reporterObj.get_sales_report('daily','20160818')
56
+ report_data=reporterObj.get_sales_report(Reporter::DATE_TYPE_DAILY,'20160818')
57
+ ```
58
+
59
+ Date types
60
+
61
+ ```
62
+ DATE_TYPE_DAILY (YYYYMMDD)
63
+ DATE_TYPE_WEEKLY (YYYYMMDD) => DD should be Sunday of the Week
64
+ DATE_TYPE_MONTHLY (YYYYMM)
65
+ DATE_TYPE_YEARLY (YYYY)
66
+
47
67
  ```
48
68
 
49
69
  And then wrap it in the Array
@@ -54,17 +74,18 @@ array = reporterObj.wrap(report_data)
54
74
 
55
75
  ## Contributing
56
76
 
77
+ You can help us to make the iReporter better.
57
78
  Bug reports and pull requests are welcome on GitHub at https://github.com/nakshay/ireporter.
58
79
 
59
80
 
60
- ## Contributors
81
+ ## Maintained by.
61
82
 
62
- Akshay Naik
83
+ **Akshay Naik**
63
84
 
64
- Rushikesh Kawadkar
85
+ **Rushikesh Kawadkar**
65
86
 
66
87
 
67
- ## Contributors
88
+ ## License
68
89
 
69
90
  The MIT License (MIT)
70
91
 
@@ -15,6 +15,8 @@ URL_FINANCE = 'https://reportingitc-reporter.apple.com/reportservice/finance/v1'
15
15
 
16
16
  DATE_TYPE_DAILY = "Daily"
17
17
  DATE_TYPE_WEEKLY = "Weekly"
18
+ DATE_TYPE_MONTHLY = "Monthly"
19
+ DATE_TYPE_YEARLY = "Yearly"
18
20
 
19
21
 
20
22
  #constructor
@@ -51,7 +53,7 @@ DATE_TYPE_WEEKLY = "Weekly"
51
53
  if response.headers[:"errormsg"]
52
54
  raise "vendor number not found"
53
55
  else response.headers[:"filename"]
54
- return response.body
56
+ return response.body.chomp
55
57
  end
56
58
  end
57
59
 
@@ -1,3 +1,3 @@
1
1
  module Ireporter
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ireporter
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
  - Akshay Naik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-01-15 00:00:00.000000000 Z
12
+ date: 2017-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler