diograph-store 0.0.2 → 0.0.3
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/{diograph_store.rb → diograph-store.rb} +12 -8
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e36b61b78e1b1a96bba5ce29930ca53c62948142
|
|
4
|
+
data.tar.gz: 1207b66568f2aede3e78bf13b40569179e2bb257
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a818202c878dddf7078ff8234fbfba5d50b1f34b4c9f7425c5130af18130a3d9e4b4bb9e75c802af075ebd6beb6b37da9d9c7b01fcdf3beedebe41dcfe1627e3
|
|
7
|
+
data.tar.gz: 10c2a4e9635eca4652a71c86ba329fe9535e5b83a5e7afab3b621a0464a2d4992cf0e3600bc7286b1dd73b0e4e1045ef2269abf5e55c448983a3e4c20d7c589a
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require 'diograph_store/store'
|
|
4
4
|
require 'diograph_store/diograph_api_request'
|
|
5
5
|
require 'models/room'
|
|
6
|
-
|
|
6
|
+
require 'diograph'
|
|
7
7
|
|
|
8
8
|
### DOKUMENTAATIO
|
|
9
9
|
module DiographStore
|
|
@@ -122,17 +122,21 @@ module DiographStore
|
|
|
122
122
|
diory
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
-
def create_connection(from_diory_id:, to_diory_id:, connection_type:)
|
|
125
|
+
def create_connection(from_diory_id:, to_diory_id:, connection_type:, connection_id: nil)
|
|
126
|
+
payload = {
|
|
127
|
+
'from-diory-diory-id' => from_diory_id,
|
|
128
|
+
'to-diory-diory-id' => to_diory_id,
|
|
129
|
+
'connection-type' => connection_type,
|
|
130
|
+
}
|
|
131
|
+
if connection_id
|
|
132
|
+
payload['connection-id'] = connection_id
|
|
133
|
+
end
|
|
134
|
+
|
|
126
135
|
request = DiographApiRequest.new(
|
|
127
136
|
method: 'POST',
|
|
128
137
|
endpoint: '/connections',
|
|
129
138
|
type: 'connections',
|
|
130
|
-
payload:
|
|
131
|
-
'from-diory-diory-id' => from_diory_id,
|
|
132
|
-
'to-diory-diory-id' => to_diory_id,
|
|
133
|
-
'connection-type' => connection_type,
|
|
134
|
-
# 'connection-id' => connection_id
|
|
135
|
-
}
|
|
139
|
+
payload: payload
|
|
136
140
|
)
|
|
137
141
|
response = request.execute
|
|
138
142
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: diograph-store
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jouni Alanen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
@@ -72,7 +72,7 @@ executables: []
|
|
|
72
72
|
extensions: []
|
|
73
73
|
extra_rdoc_files: []
|
|
74
74
|
files:
|
|
75
|
-
- lib/
|
|
75
|
+
- lib/diograph-store.rb
|
|
76
76
|
- lib/diograph_store/diograph_api_request.rb
|
|
77
77
|
homepage: http://dioryme.github.io
|
|
78
78
|
licenses: []
|