faithteams-api 2.0.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +1 -1
- data/lib/faithteams/api/v2/connection.rb +1 -16
- data/lib/faithteams/api/v2/gateway.rb +0 -5
- data/lib/faithteams/api/v2/resource.rb +0 -1
- data/lib/faithteams/version.rb +1 -1
- data/thunder-tests/collections/tc_col_faithteams-api.json +1301 -0
- data/thunder-tests/collections/tc_col_faithteams-app.json +1189 -0
- data/thunder-tests/environments/tc_env_faithteams.json +5 -5
- data/thunder-tests/faithteams.env.template +0 -1
- metadata +5 -5
- data/lib/faithteams/api/v2/resource/user.rb +0 -40
- data/thunder-tests/collections/tc_col_faithteams.json +0 -2390
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01586c73ee318708383bb14df2011145b83ca9ec382ddf0cfe2ebc49cee3fac3'
|
4
|
+
data.tar.gz: 4a0c59dbc8428336ae1e286571679492756a8fb72aa6caec286d5d5cbf5c5d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b702bc6fb5800697729f51a0bed56bbf6840f2d24f8da7dd9c3a9df1e32940e1e9d96155ba124f30ec1bc1cbceee3a80b9b0be1a702dd607d8298c3f90c76c79
|
7
|
+
data.tar.gz: 3a0380ff6826f18fcd405af6bd9bf3c0d0478bbf479cfc65f17182f620986a115564eb14ee9449276ae2d75d143e85f9728a84b037abe79c4d4f141034a3f072
|
data/CHANGELOG.md
CHANGED
@@ -7,7 +7,17 @@ All notable changes to this project will be documented in this file.
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
9
9
|
|
10
|
-
## [
|
10
|
+
## [3.0.0] - 2024-05-20 -
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
1. Use basic auth for all API requests and remove User. (IN-2429)
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
|
18
|
+
1. Remove `Resource::User` and `Resource::User#authenticate`. (IN-2429)
|
19
|
+
|
20
|
+
## [2.0.2] - 2024-04-04 - https://github.com/tithely/faithteams-api/pull/5
|
11
21
|
|
12
22
|
### Fixed
|
13
23
|
|
data/Gemfile.lock
CHANGED
@@ -10,7 +10,6 @@ module FaithTeams
|
|
10
10
|
class Connection
|
11
11
|
# Specific base urls for different resources
|
12
12
|
ENDPOINT_BASE_URLS = {
|
13
|
-
"authenticate" => "https://app.faithteams.com/api/v2",
|
14
13
|
"batches" => "https://api-v2.faithteams.com",
|
15
14
|
"contributions" => "https://api-v2.faithteams.com",
|
16
15
|
"contributiontypes" => "https://api-v2.faithteams.com",
|
@@ -77,8 +76,6 @@ module FaithTeams
|
|
77
76
|
response = http.get(url, params: params)
|
78
77
|
end
|
79
78
|
break if response.status != 401 || retries >= 2
|
80
|
-
|
81
|
-
authenticate
|
82
79
|
end
|
83
80
|
|
84
81
|
raise Error::Request.new(response: response, message: "Request unsuccessful (#{response.status})") unless response.status.success?
|
@@ -116,7 +113,7 @@ module FaithTeams
|
|
116
113
|
|
117
114
|
# @return [HTTP::Client]
|
118
115
|
def http
|
119
|
-
@http ||= HTTP.
|
116
|
+
@http ||= HTTP.basic_auth(user: user_id, pass: password)
|
120
117
|
end
|
121
118
|
|
122
119
|
# @param path [String]
|
@@ -124,18 +121,6 @@ module FaithTeams
|
|
124
121
|
def base_url(path:)
|
125
122
|
ENDPOINT_BASE_URLS[path.split("/")[1]]
|
126
123
|
end
|
127
|
-
|
128
|
-
# Set the auth_token for these requests
|
129
|
-
# @return [String]
|
130
|
-
def auth_token
|
131
|
-
@auth_token ||= user_resource.authenticate
|
132
|
-
end
|
133
|
-
|
134
|
-
# Resets existing auth_token and re-authenticates
|
135
|
-
def authenticate
|
136
|
-
@auth_token = nil
|
137
|
-
auth_token
|
138
|
-
end
|
139
124
|
end
|
140
125
|
end
|
141
126
|
end
|
@@ -32,11 +32,6 @@ module FaithTeams
|
|
32
32
|
@contribution ||= Resource::Contribution.new(connection: connection)
|
33
33
|
end
|
34
34
|
|
35
|
-
# @return [Resource::User]
|
36
|
-
def user
|
37
|
-
@user ||= Resource::User.new(connection: connection)
|
38
|
-
end
|
39
|
-
|
40
35
|
# @return [Resource::ContributionType]
|
41
36
|
def contribution_type
|
42
37
|
@contribution_type ||= Resource::ContributionType.new(connection: connection)
|
data/lib/faithteams/version.rb
CHANGED