spearly-sdk-ruby 0.7.0 → 0.8.0
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/CHANGELOG.md +4 -0
- data/lib/spearly/auth/client.rb +17 -0
- data/lib/spearly/version.rb +1 -1
- data/spearly.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a63b85112898d41d2cfb6f4a65f45e371f5c83cef8ea80402c80f5e2914a32aa
|
4
|
+
data.tar.gz: bf0cda8a4184a7e3bbe29ff067f5b575969c60c67f14737bd3d723de5fe32091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25732ccb37984d326cb936cdbba1c7a11fccbbdf034b52ba96c542c759e0eeedcd47d5e873aeb3be439e02f069e37b8d7ccddc404dbe43759a081d7a7e7f8b78
|
7
|
+
data.tar.gz: 4d42a6e0fb080d2c94eef1d3d827317b0ec292d00f771beeedb132b6cc53105369531d4e5689b40ad218d2e5dc53b3eb066b48644d5e421c544e00db2ccba640
|
data/CHANGELOG.md
CHANGED
data/lib/spearly/auth/client.rb
CHANGED
@@ -5,6 +5,23 @@ module Spearly
|
|
5
5
|
@token = token
|
6
6
|
end
|
7
7
|
|
8
|
+
def get_user(user_id)
|
9
|
+
uri = "#{ENV['SPEARLY_API_URL']}/users/#{user_id}"
|
10
|
+
uri_parsed = Addressable::URI.parse(uri).normalize.to_s
|
11
|
+
client = Faraday.default_connection
|
12
|
+
|
13
|
+
res = client.get(uri_parsed,
|
14
|
+
nil,
|
15
|
+
'Accept' => 'application/vnd.spearly.v2+json',
|
16
|
+
'Authorization' => @token)
|
17
|
+
|
18
|
+
if res.status == 200
|
19
|
+
JSON.parse(res.body)['data']
|
20
|
+
else
|
21
|
+
{}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
8
25
|
def create_team(params)
|
9
26
|
uri = "#{ENV['SPEARLY_API_URL']}/teams"
|
10
27
|
uri_parsed = Addressable::URI.parse(uri).normalize.to_s
|
data/lib/spearly/version.rb
CHANGED
data/spearly.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.name = 'spearly-sdk-ruby'
|
7
7
|
gem.version = Spearly::VERSION
|
8
8
|
gem.author = 'Spearly'
|
9
|
-
gem.email = ['
|
9
|
+
gem.email = ['dj@unimal.jp']
|
10
10
|
|
11
11
|
gem.summary = 'Spearly SDK for Ruby'
|
12
12
|
gem.homepage = 'https://github.com/unimal-jp/spearly-sdk-ruby'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spearly-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spearly
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -128,9 +128,9 @@ dependencies:
|
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '2.3'
|
131
|
-
description:
|
131
|
+
description:
|
132
132
|
email:
|
133
|
-
-
|
133
|
+
- dj@unimal.jp
|
134
134
|
executables:
|
135
135
|
- spearly
|
136
136
|
extensions: []
|
@@ -168,8 +168,8 @@ licenses: []
|
|
168
168
|
metadata:
|
169
169
|
homepage_uri: https://github.com/unimal-jp/spearly-sdk-ruby
|
170
170
|
source_code_uri: https://github.com/unimal-jp/spearly-sdk-ruby
|
171
|
-
changelog_uri: https://github.com/unimal-jp/spearly-sdk-ruby/blob/v0.
|
172
|
-
post_install_message:
|
171
|
+
changelog_uri: https://github.com/unimal-jp/spearly-sdk-ruby/blob/v0.8.0/CHANGELOG.md
|
172
|
+
post_install_message:
|
173
173
|
rdoc_options: []
|
174
174
|
require_paths:
|
175
175
|
- lib
|
@@ -184,8 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
188
|
-
signing_key:
|
187
|
+
rubygems_version: 3.3.7
|
188
|
+
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: Spearly SDK for Ruby
|
191
191
|
test_files: []
|