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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aba6dfca1e4d5a51a0262d4e109a83b9801df278
4
- data.tar.gz: 434e5083fa5bbb9c255281016a54d50ec1f7eafb
3
+ metadata.gz: e36b61b78e1b1a96bba5ce29930ca53c62948142
4
+ data.tar.gz: 1207b66568f2aede3e78bf13b40569179e2bb257
5
5
  SHA512:
6
- metadata.gz: e3b17ea5b9c55bc4060420bd3715af5d4b56a7d3ea1ff5a5b2e8b704fc3382fff37bccf3a72fbd7a5aa1cd4db1675e445e8be45e36791f1a192839cd0825fca8
7
- data.tar.gz: 6d1aef7470a44c1fd30b801289cb7f7ea2e6fe16f0d164c971ccbb5bf0f44c0b394b677c33c0c26ca75d0ac111edfda78c1ef7af60a28f0e087248911fe9fcc3
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
- require_relative 'diograph'
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.2
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: 2018-02-27 00:00:00.000000000 Z
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/diograph_store.rb
75
+ - lib/diograph-store.rb
76
76
  - lib/diograph_store/diograph_api_request.rb
77
77
  homepage: http://dioryme.github.io
78
78
  licenses: []