tiltify 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tiltify/collection.rb +7 -3
- data/lib/tiltify/objects/donation.rb +1 -2
- data/lib/tiltify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28e06050724f28a81000611903d2ed4916137cad9ea1a1386185a2fec6bd959c
|
4
|
+
data.tar.gz: c38a443d0dd4996d0c4eee0e32965770269e09fb2963c8e113174915b27a758e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bc8c628b1b082b14a35dfa1a263c7370788eeabd4601ce70462a3d8fae40bc831fdcb3ecc3d0a3181ebc778a30847c95d39d8b9447a23fbd693c55d885a5b36
|
7
|
+
data.tar.gz: 8f2d6e29205d04103e7c2b4e04098539daebde34ee1b84a6f33cb4895782a76ed053279cd7cdbb881a38164150a5776b0175995f46cceacf9fbc309f45992826
|
data/Gemfile.lock
CHANGED
data/lib/tiltify/collection.rb
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
module Tiltify
|
2
2
|
class Collection
|
3
|
-
attr_reader :data, :total
|
3
|
+
attr_reader :data, :total, :has_prev, :has_next
|
4
4
|
|
5
5
|
def self.from_response(response, type:)
|
6
6
|
body = response.body
|
7
7
|
|
8
8
|
new(
|
9
9
|
data: body["data"].map { |attrs| type.new(attrs) },
|
10
|
-
total: body["data"].count
|
10
|
+
total: body["data"].count,
|
11
|
+
has_prev: !body["links"]["prev"].blank?,
|
12
|
+
has_next: !body["links"]["next"].blank?
|
11
13
|
)
|
12
14
|
end
|
13
15
|
|
14
|
-
def initialize(data:, total:)
|
16
|
+
def initialize(data:, total:, has_prev:, has_next:)
|
15
17
|
@data = data
|
16
18
|
@total = total
|
19
|
+
@has_prev = has_prev
|
20
|
+
@has_next = has_next
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -4,8 +4,7 @@ module Tiltify
|
|
4
4
|
def initialize(options = {})
|
5
5
|
super options
|
6
6
|
|
7
|
-
self.
|
8
|
-
self.updated_at = Time.at(options["updatedAt"].to_s[0..-4].to_i)
|
7
|
+
self.completed_at = Time.at(options["completedAt"].to_s[0..-4].to_i)
|
9
8
|
end
|
10
9
|
|
11
10
|
end
|
data/lib/tiltify/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiltify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|