tiltify 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d05abbdc1199dbe6d1b6fb133619734a3915e1d6e48825fc9f3a304b4bcc55f5
4
- data.tar.gz: e2132fcabf47210fc09f515ae40e2b197ef9c22ee25118ba90a70bc3c3f1034a
3
+ metadata.gz: de4b0ac4ba6b988eca685054c25fc6f1e8579ceec00d1d7cdc6091bf06b1ace6
4
+ data.tar.gz: d88687edb6753f9a3b34bf3936740646322eea8be82b2ae18a2589763eda1c55
5
5
  SHA512:
6
- metadata.gz: 04451dc33eff2f13fde623cafa8e0a1d248d10b36faf7c467f71a5dab1b93eb29cbc01a619f4981794d1017c3db79676af83e07bd1a2b637dedf7526426cae76
7
- data.tar.gz: fe89308b9dbe265c8a0ffc87725874cb1c91d244bb79ef5b0e31c68edc8d5894b6328eccb13b7f37ed29f55ffe48d631a6aa323eff8e3b693c997497c58366e1
6
+ metadata.gz: bfa30019176b28a06b42e2bab140d33cf1b7d4ba06a160a0a44f0e15dedc46798aa8f4e2108dc074c9400161ef988b518112b058ec13d939d1d8b8161e5ea84d
7
+ data.tar.gz: ea13d6f2ace92776824adbbb3f1532a77d754860f50fac5b47c223659281a04315ea0eb92a55dbb81272a63495154bdeb702b45c423670d739f0dec506cf9761
data/Gemfile.lock CHANGED
@@ -1,37 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiltify (0.1.0)
5
- faraday (~> 1.7)
6
- faraday_middleware (~> 1.1)
4
+ tiltify (0.1.1)
5
+ faraday (~> 2.0)
7
6
 
8
7
  GEM
9
8
  remote: https://rubygems.org/
10
9
  specs:
11
10
  dotenv (2.7.6)
12
- faraday (1.8.0)
13
- faraday-em_http (~> 1.0)
14
- faraday-em_synchrony (~> 1.0)
15
- faraday-excon (~> 1.1)
16
- faraday-httpclient (~> 1.0.1)
17
- faraday-net_http (~> 1.0)
18
- faraday-net_http_persistent (~> 1.1)
19
- faraday-patron (~> 1.0)
20
- faraday-rack (~> 1.0)
21
- multipart-post (>= 1.2, < 3)
11
+ faraday (2.2.0)
12
+ faraday-net_http (~> 2.0)
22
13
  ruby2_keywords (>= 0.0.4)
23
- faraday-em_http (1.0.0)
24
- faraday-em_synchrony (1.0.0)
25
- faraday-excon (1.1.0)
26
- faraday-httpclient (1.0.1)
27
- faraday-net_http (1.0.1)
28
- faraday-net_http_persistent (1.2.0)
29
- faraday-patron (1.0.0)
30
- faraday-rack (1.0.0)
31
- faraday_middleware (1.2.0)
32
- faraday (~> 1.0)
33
- minitest (5.14.4)
34
- multipart-post (2.1.1)
14
+ faraday-net_http (2.0.2)
15
+ minitest (5.15.0)
35
16
  rake (13.0.6)
36
17
  ruby2_keywords (0.0.5)
37
18
 
data/README.md CHANGED
@@ -92,3 +92,12 @@ Responses are created as objects like `Tiltify::Campaign`. Having types like `Ti
92
92
  # Retrieves a list of a teams campaigns
93
93
  @client.teams.campaigns(team_id: "id")
94
94
  ```
95
+
96
+
97
+ ## Contributing
98
+
99
+ Bug reports and pull requests are welcome on GitHub at https://github.com/deanpcmad/tiltify.
100
+
101
+ ## License
102
+
103
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -32,9 +32,7 @@ module Tiltify
32
32
  @connection ||= Faraday.new(BASE_URL) do |conn|
33
33
  conn.request :authorization, :Bearer, access_token
34
34
  conn.request :json
35
-
36
- conn.response :dates
37
- conn.response :json, content_type: "application/json"
35
+ conn.response :json
38
36
 
39
37
  conn.adapter adapter, @stubs
40
38
  end
@@ -1,21 +1,19 @@
1
1
  module Tiltify
2
2
  class Collection
3
- attr_reader :data, :total, :cursor
3
+ attr_reader :data, :total
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,
11
- cursor: body.dig("pagination", "cursor")
10
+ total: body["data"].count
12
11
  )
13
12
  end
14
13
 
15
- def initialize(data:, total:, cursor:)
14
+ def initialize(data:, total:)
16
15
  @data = data
17
16
  @total = total
18
- @cursor = cursor.nil? ? nil : cursor
19
17
  end
20
18
  end
21
19
  end
@@ -6,7 +6,7 @@ module Tiltify
6
6
  end
7
7
 
8
8
  def donations(campaign_id:, **params)
9
- response = get_request("campaigns/#{campaign_id}/donations", params)
9
+ response = get_request("campaigns/#{campaign_id}/donations", params: params)
10
10
  Collection.from_response(response, type: Donation)
11
11
  end
12
12
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tiltify
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/tiltify.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "faraday"
4
- require "faraday_middleware"
5
4
 
6
5
  require_relative "tiltify/version"
7
6
 
data/tiltify.gemspec CHANGED
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
- spec.add_dependency "faraday", "~> 1.7"
32
- spec.add_dependency "faraday_middleware", "~> 1.1"
31
+ spec.add_dependency "faraday", "~> 2.0"
33
32
  end
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Perry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-24 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
27
- - !ruby/object:Gem::Dependency
28
- name: faraday_middleware
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.1'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.1'
26
+ version: '2.0'
41
27
  description:
42
28
  email:
43
29
  - dean@deanpcmad.com
@@ -94,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
80
  - !ruby/object:Gem::Version
95
81
  version: '0'
96
82
  requirements: []
97
- rubygems_version: 3.1.6
83
+ rubygems_version: 3.3.7
98
84
  signing_key:
99
85
  specification_version: 4
100
86
  summary: A Ruby library for the Tiltify v3 API