tiltify 0.1.3 → 0.1.6

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
  SHA256:
3
- metadata.gz: 28e06050724f28a81000611903d2ed4916137cad9ea1a1386185a2fec6bd959c
4
- data.tar.gz: c38a443d0dd4996d0c4eee0e32965770269e09fb2963c8e113174915b27a758e
3
+ metadata.gz: f65d5f8c963628131d70bad3fd9f70bed27189090baeab7a8305fdf8e388588d
4
+ data.tar.gz: 93a7c1dd2770087a850e8d316eb1d7d30e13adcab4f48d71fa6fddd0b0798989
5
5
  SHA512:
6
- metadata.gz: 3bc8c628b1b082b14a35dfa1a263c7370788eeabd4601ce70462a3d8fae40bc831fdcb3ecc3d0a3181ebc778a30847c95d39d8b9447a23fbd693c55d885a5b36
7
- data.tar.gz: 8f2d6e29205d04103e7c2b4e04098539daebde34ee1b84a6f33cb4895782a76ed053279cd7cdbb881a38164150a5776b0175995f46cceacf9fbc309f45992826
6
+ metadata.gz: f87a60554c098f47069a22adf46adf3e844c417a66e9003f9eb434129c18b62f5a48a40245921394c5611685b60079fa11cf04f5b13157f8c053d9ee032c4981
7
+ data.tar.gz: 873d7de50f7da95defa1f2ebb045925391c03e6015a3230dac79cb2a33da3fb23bf612cff5d172e580ccf2c11988015993acc797cd5a3d1a7ab151e4fb36ff8d
data/Gemfile.lock CHANGED
@@ -1,17 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiltify (0.1.3)
4
+ tiltify (0.1.6)
5
5
  faraday (~> 2.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  dotenv (2.7.6)
11
- faraday (2.2.0)
12
- faraday-net_http (~> 2.0)
11
+ faraday (2.5.2)
12
+ faraday-net_http (>= 2.0, < 3.1)
13
13
  ruby2_keywords (>= 0.0.4)
14
- faraday-net_http (2.0.2)
14
+ faraday-net_http (3.0.0)
15
15
  minitest (5.15.0)
16
16
  rake (13.0.6)
17
17
  ruby2_keywords (0.0.5)
@@ -20,6 +20,10 @@ module Tiltify
20
20
  CausesResource.new(self)
21
21
  end
22
22
 
23
+ def fundraising_events
24
+ FundraisingEventsResource.new(self)
25
+ end
26
+
23
27
  def users
24
28
  UsersResource.new(self)
25
29
  end
@@ -8,12 +8,12 @@ module Tiltify
8
8
  new(
9
9
  data: body["data"].map { |attrs| type.new(attrs) },
10
10
  total: body["data"].count,
11
- has_prev: !body["links"]["prev"].blank?,
12
- has_next: !body["links"]["next"].blank?
11
+ has_prev: body["links"] && !body["links"]["prev"].blank?,
12
+ has_next: body["links"] && !body["links"]["next"].blank?
13
13
  )
14
14
  end
15
15
 
16
- def initialize(data:, total:, has_prev:, has_next:)
16
+ def initialize(data:, total:, has_prev: nil, has_next: nil)
17
17
  @data = data
18
18
  @total = total
19
19
  @has_prev = has_prev
@@ -0,0 +1,4 @@
1
+ module Tiltify
2
+ class FundraisingEvent < Object
3
+ end
4
+ end
@@ -0,0 +1,9 @@
1
+ module Tiltify
2
+ class FundraisingEventsResource < Resource
3
+
4
+ def retrieve(fundraising_event_id:)
5
+ FundraisingEvent.new get_request("fundraising-events/#{fundraising_event_id}").body.dig("data")
6
+ end
7
+
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tiltify
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/tiltify.rb CHANGED
@@ -14,11 +14,13 @@ module Tiltify
14
14
 
15
15
  autoload :CampaignsResource, "tiltify/resources/campaigns"
16
16
  autoload :CausesResource, "tiltify/resources/causes"
17
+ autoload :FundraisingEventsResource, "tiltify/resources/fundraising_events"
17
18
  autoload :UsersResource, "tiltify/resources/users"
18
19
  autoload :TeamsResource, "tiltify/resources/teams"
19
20
 
20
21
  autoload :Campaign, "tiltify/objects/campaign"
21
22
  autoload :Donation, "tiltify/objects/donation"
23
+ autoload :FundraisingEvent, "tiltify/objects/fundraising_event"
22
24
  autoload :Reward, "tiltify/objects/reward"
23
25
  autoload :Poll, "tiltify/objects/poll"
24
26
  autoload :Challenge, "tiltify/objects/challenge"
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.3
4
+ version: 0.1.6
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-28 00:00:00.000000000 Z
11
+ date: 2022-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -47,6 +47,7 @@ files:
47
47
  - lib/tiltify/objects/cause.rb
48
48
  - lib/tiltify/objects/challenge.rb
49
49
  - lib/tiltify/objects/donation.rb
50
+ - lib/tiltify/objects/fundraising_event.rb
50
51
  - lib/tiltify/objects/poll.rb
51
52
  - lib/tiltify/objects/reward.rb
52
53
  - lib/tiltify/objects/schedule.rb
@@ -55,6 +56,7 @@ files:
55
56
  - lib/tiltify/resource.rb
56
57
  - lib/tiltify/resources/campaigns.rb
57
58
  - lib/tiltify/resources/causes.rb
59
+ - lib/tiltify/resources/fundraising_events.rb
58
60
  - lib/tiltify/resources/teams.rb
59
61
  - lib/tiltify/resources/users.rb
60
62
  - lib/tiltify/version.rb