daashub_api 0.3.0 → 0.3.1
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 +4 -4
- data/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/daashub_api/.DS_Store +0 -0
- data/lib/daashub_api/batch_file.rb +23 -0
- data/lib/daashub_api/rest/.DS_Store +0 -0
- data/lib/daashub_api/rest/batch_file.rb +21 -0
- data/lib/daashub_api/version.rb +1 -1
- metadata +7 -2
- data/daashub_api-0.2.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 548ac7943336fba700318ed417dac838328a3254
|
4
|
+
data.tar.gz: cd830140de7214fa206c4b7f3c3bf7967070207e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 726b4af4fcbd45ce4bb6fca52d1eca26c8990f4aa88ad99f8f3fa9d6c2f5c314f1210c23047694621e219ad32a7407b1cdf9171864a443a88d4fae10fc82548c
|
7
|
+
data.tar.gz: 3c5a368f24566084374bd260067832a246af4addae4a88539e39bbe194212ad3dce7cea9d82231a1ad96027db2c4142cc478fb00336d48bb4b9d7b3f39c8f455
|
data/.DS_Store
ADDED
Binary file
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'daashub_api/base'
|
2
|
+
|
3
|
+
module DaashubAPI
|
4
|
+
class BatchFile < Base
|
5
|
+
def started_at
|
6
|
+
attr_to_date(:started_at)
|
7
|
+
end
|
8
|
+
|
9
|
+
def finished_at
|
10
|
+
attr_to_date(:finished_at)
|
11
|
+
end
|
12
|
+
|
13
|
+
def created_at
|
14
|
+
attr_to_date(:created_at)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def attr_to_date(attr_name)
|
20
|
+
(date = @attributes[attr_name]) && Time.parse(date)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'daashub_api/batch_file'
|
2
|
+
require 'daashub_api/request'
|
3
|
+
|
4
|
+
module DaashubAPI
|
5
|
+
module REST
|
6
|
+
module BatchFile
|
7
|
+
def list_batch_files
|
8
|
+
response = DaashubAPI::Request.perform_get('/v1/batch_files',
|
9
|
+
access_token)
|
10
|
+
response['items'].map { |item| DaashubAPI::BatchFile.new(item) }
|
11
|
+
end
|
12
|
+
|
13
|
+
def create_batch_file(params)
|
14
|
+
query = { batch_file: params }
|
15
|
+
response = DaashubAPI::Request.perform_post('/v1/batch_files',
|
16
|
+
access_token, query: query)
|
17
|
+
DaashubAPI::BatchFile.new(response)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/daashub_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daashub_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Brzózka
|
@@ -101,6 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".DS_Store"
|
104
105
|
- ".gitignore"
|
105
106
|
- ".rspec"
|
106
107
|
- ".travis.yml"
|
@@ -108,18 +109,22 @@ files:
|
|
108
109
|
- LICENSE.txt
|
109
110
|
- README.md
|
110
111
|
- Rakefile
|
111
|
-
- daashub_api-0.2.0.gem
|
112
112
|
- daashub_api.gemspec
|
113
|
+
- lib/.DS_Store
|
113
114
|
- lib/daashub_api.rb
|
115
|
+
- lib/daashub_api/.DS_Store
|
114
116
|
- lib/daashub_api/account.rb
|
115
117
|
- lib/daashub_api/base.rb
|
118
|
+
- lib/daashub_api/batch_file.rb
|
116
119
|
- lib/daashub_api/client.rb
|
117
120
|
- lib/daashub_api/company.rb
|
118
121
|
- lib/daashub_api/errors.rb
|
119
122
|
- lib/daashub_api/history.rb
|
120
123
|
- lib/daashub_api/query.rb
|
121
124
|
- lib/daashub_api/request.rb
|
125
|
+
- lib/daashub_api/rest/.DS_Store
|
122
126
|
- lib/daashub_api/rest/account.rb
|
127
|
+
- lib/daashub_api/rest/batch_file.rb
|
123
128
|
- lib/daashub_api/rest/company.rb
|
124
129
|
- lib/daashub_api/rest/history.rb
|
125
130
|
- lib/daashub_api/version.rb
|
data/daashub_api-0.2.0.gem
DELETED
Binary file
|