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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b191a5c6747aa61591ac0814ab291186952f531e4c57cacea840a20c3cc35765
4
- data.tar.gz: 15761f6518078b18ca44e6291d13decee06b9e25f2fe929e83ab047519a75288
3
+ metadata.gz: a63b85112898d41d2cfb6f4a65f45e371f5c83cef8ea80402c80f5e2914a32aa
4
+ data.tar.gz: bf0cda8a4184a7e3bbe29ff067f5b575969c60c67f14737bd3d723de5fe32091
5
5
  SHA512:
6
- metadata.gz: 1d1b10c84917d54971d20ae6484160855f782876a3286fb8b2c63136e61565e096b0e65bf8f11d09d7a6a417bd4a0a565398acfcabfb1eafe325caccce73a23e
7
- data.tar.gz: 71566f9e3973b6e42872ab7078ec70a8baeeb8732e2b4ecb65209f22e438ed811f45cd4064f2256e2031d24496e438a000b6ce30502a9c9d01ac3e002eda9986
6
+ metadata.gz: 25732ccb37984d326cb936cdbba1c7a11fccbbdf034b52ba96c542c759e0eeedcd47d5e873aeb3be439e02f069e37b8d7ccddc404dbe43759a081d7a7e7f8b78
7
+ data.tar.gz: 4d42a6e0fb080d2c94eef1d3d827317b0ec292d00f771beeedb132b6cc53105369531d4e5689b40ad218d2e5dc53b3eb066b48644d5e421c544e00db2ccba640
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.8.0] - 2022-06-15
2
+
3
+ - `Spearly::Auth::Client#get_user`
4
+
1
5
  ## [0.7.0] - 2022-01-31
2
6
 
3
7
  - `Spearly::Cloud::Client#get_site`
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spearly
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
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 = ['djgrill@unimal.jp']
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.7.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-01-31 00:00:00.000000000 Z
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
- - djgrill@unimal.jp
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.7.0/CHANGELOG.md
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.2.13
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: []