synapseruby 1.0.15 → 1.0.16
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/lib/synapse_api/user.rb +8 -1
- data/lib/synapse_api/version.rb +1 -1
- data/samples.md +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76f9a5b46f47d798880cff6f3432b6b899ada8cf
|
4
|
+
data.tar.gz: 9fa5d394c21d02ae7c852acb6a66ea1f7fe3c6ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c1d6b5c0f04432817d51261f53a7b7e96bb65e206c56296183ff54365cf14d5b5fb5bbd3a3da0c0dcf790c474cf0d2b1663caac56d38a7b08abec4dac3fe33
|
7
|
+
data.tar.gz: 55498ae1597aa6b9cee18f3b64f9f503d66b70c48831f4f470273263a5ca2d7bd15f43d445b8acaf81cde90622d1f3babb2b5e5b00184e6a896e6fb279d59fe1
|
data/lib/synapse_api/user.rb
CHANGED
@@ -684,9 +684,16 @@ module Synapse
|
|
684
684
|
# Queries a node for a specific subnet by subnet_id
|
685
685
|
# @param node_id [String] id of node
|
686
686
|
# @param subnet_id [String,void] (optional) id of a subnet to look up
|
687
|
+
# @param full_dehydrate [String](optional)
|
687
688
|
# @return [Synapse::Subnet]
|
688
|
-
def get_subnet(node_id:,subnet_id
|
689
|
+
def get_subnet(node_id:,subnet_id:,**options)
|
689
690
|
path = node(user_id: self.user_id, node_id: node_id) + "/subnets/#{subnet_id}"
|
691
|
+
|
692
|
+
params = VALID_QUERY_PARAMS.map do |p|
|
693
|
+
options[p] ? "#{p}=#{options[p]}" : nil
|
694
|
+
end.compact
|
695
|
+
path += '?' + params.join('&') if params.any?
|
696
|
+
|
690
697
|
begin
|
691
698
|
subnet = client.get(path)
|
692
699
|
rescue Synapse::Error::Unauthorized
|
data/lib/synapse_api/version.rb
CHANGED
data/samples.md
CHANGED
@@ -206,7 +206,7 @@ institutions = client.get_all_institutions(page: 5, per_page: 5)
|
|
206
206
|
- Returns api response
|
207
207
|
|
208
208
|
```bash
|
209
|
-
scope = "USERS|GET,USER|GET,USER|PATCH"
|
209
|
+
scope = ["USERS|GET","USER|GET","USER|PATCH"]
|
210
210
|
public_key = client.issue_public_key(scope: scope)
|
211
211
|
```
|
212
212
|
|
@@ -215,7 +215,7 @@ public_key = client.issue_public_key(scope: scope)
|
|
215
215
|
##### Get New Oauth
|
216
216
|
|
217
217
|
```bash
|
218
|
-
scope =["USERS|GET,USER|GET,USER|PATCH"]
|
218
|
+
scope =["USERS|GET","USER|GET","USER|PATCH"]
|
219
219
|
user.authenticate(scope: scope)
|
220
220
|
```
|
221
221
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapseruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emmanuel Mawutor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|