urbit-api 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md DELETED
@@ -1,266 +0,0 @@
1
- # Urbit::Api
2
-
3
- ## The Ruby interface to the Urbit HTTP API
4
-
5
- This library wraps the Urbit ship http interface exposing it as a Ruby gem.
6
-
7
- [![awesome urbit badge](https://img.shields.io/badge/~-awesome%20urbit-lightgrey)](https://github.com/urbit/awesome-urbit)
8
- [![Gem Version](https://badge.fury.io/rb/urbit-api.svg)](https://badge.fury.io/rb/urbit-api)
9
- [![License](https://img.shields.io/github/license/Zaxonomy/urbit-ruby)](https://github.com/Zaxonomy/urbit-ruby/blob/master/LICENSE.txt)
10
-
11
- ## Installation
12
-
13
- Add this line to your application's Gemfile:
14
-
15
- ```ruby
16
- gem 'urbit-api'
17
- ```
18
-
19
- And then execute:
20
-
21
- $ bundle install
22
-
23
- Or install it yourself as:
24
-
25
- $ gem install urbit-api
26
-
27
- ## Usage
28
-
29
- ```sh
30
- > bin/console
31
-
32
- # This will instantiate a ship that connects to the fake `~zod` dev server by default
33
- # See Urbit docs for more info: https://urbit.org/using/develop/
34
- [1] pry(main)> ship = Urbit.new
35
- => #<Urbit::Ship:0x00007fa74b87f920 ...
36
-
37
- OR... with config file...
38
- > ship = Urbit.connect(config_file: '_config-barsyr-latreb.yml')
39
-
40
- > ship.logged_in?
41
- => false
42
-
43
- > ship.login
44
- => #<Urbit::Ship:0x00007fa74b87f920 ...
45
-
46
- > ship.logged_in?
47
- => true
48
-
49
- > ship.to_s
50
- => "a Ship(name: '~barsyr-latreb', host: 'http://localhost', port: '8080')"
51
-
52
- > channel = ship.subscribe(app: 'graph-store', path: '/updates')
53
- => a Channel (Open) on ~barsyr-latreb(name: 'Channel-0', key: '1622836437b540b4')
54
-
55
- # Subscribing works by opening a Channel. Your ships has a collection of all it's open Channels.
56
- > channel = ship.open_channels.first
57
- => a Channel (Open) on ~barsyr-latreb(name: 'Channel-0', key: '1622836437b540b4')
58
-
59
- # Notice that it's the same one.
60
-
61
- # Every Channel has a unique key to identify it.
62
- > channel.key
63
- => "16142890875c348d"
64
-
65
- # The Channel has a Receiver that will now be listening on the app and path you specified. Each time an event is sent in it will be stored in the receiver's facts collection.
66
- > channel.receiver.facts.count
67
- => 12
68
-
69
- # Perform any action through landscape that would initiate an update into %graph-store...
70
- # In this case I have added a comment to a local notebook.
71
- > channel.receiver.facts.last
72
- => a Fact({:ship=>{:name=>"~barsyr-latreb", :host=>"http://localhost", :port=>"8080"}, :resource=>"~barsyr-latreb/test0-996", :acknowleged=>true, :is_graph_update=>true})
73
-
74
- # Your ship keeps a collection of all the messages sent to urbit:
75
- > channel.sent_messages.collect {|m| m.to_s}
76
- => [
77
- "a Message({:action=>"poke", :app=>"hood", :id=>1, :json=>"Opening Airlock", :mark=>"helm-hi", :ship=>"barsyr-latreb"})",
78
- "a Message({:action=>"subscribe", :app=>"graph-store", :id=>2, :path=>"/updates", :ship=>"barsyr-latreb"})",
79
- "a Message({"id"=>3, "action"=>"ack", "event-id"=>"0"})",
80
- "a Message({"id"=>4, "action"=>"ack", "event-id"=>"1"})",
81
- "a Message({"id"=>5, "action"=>"ack", "event-id"=>"2"})"
82
- ]
83
-
84
- #
85
- # --------------------------------------------------------------------
86
- # Poke
87
- # --------------------------------------------------------------------
88
- #
89
- > ship.poke(app: 'hood', mark: 'helm-hi', message: 'Opening Airlock')
90
- => a Channel (Open) on ~barsyr-latreb(name: 'Channel-0', key: '1630355920a717e1')
91
-
92
- #
93
- # --------------------------------------------------------------------
94
- # Scry
95
- # --------------------------------------------------------------------
96
- #
97
- # Retrieving your ship's base hash using scry....
98
- > ship.scry(app: 'file-server', path: '/clay/base/hash')
99
- # => {:status=>200, :code=>"ok", :body=>"\"e75k5\""}
100
-
101
- #
102
- # --------------------------------------------------------------------
103
- # Spider
104
- # --------------------------------------------------------------------
105
- #
106
- # Creating a new Notebook in "My Channels" using %spider....
107
- > create_json = %Q(
108
- {"create": {"resource": { "ship": "~zod", "name": "random_name"},
109
- "title": "Testing",
110
- "description": "Testing Un-Managed Graph Creation",
111
- "associated" : {"policy": {"invite": {"pending": []}}},
112
- "module": "publish", "mark": "graph-validator-publish"}}
113
- )
114
- > ship.spider(mark_in: 'graph-view-action', mark_out: 'json', thread: 'graph-create', data: create_json)
115
- # => {:status=>200, :code=>"ok", :body=>"\"e75k5\""}
116
-
117
- #
118
- # --------------------------------------------------------------------
119
- # %graph-store
120
- # --------------------------------------------------------------------
121
- #
122
- > puts ship.graph_names
123
- ~barsyr-latreb/dm-inbox
124
- ~darlur/announce
125
- ~bitbet-bolbel/urbit-community-5.963
126
- ~winter-paches/top-shelf-6391
127
- ~winter-paches/the-great-north-7.579
128
- ~barsyr-latreb/test0-996
129
- ~fabled-faster/test-chat-a-5919
130
- ~barsyr-latreb/test1-4287
131
- ~darrux-landes/welcome-to-urbit-community
132
- ~millyt-dorsen/finance-2.962
133
- ~fabled-faster/interface-testing-facility-683
134
- ~darlur/help-desk-4556
135
- =>
136
-
137
- # Reference a graph by name and return a single node.
138
- > puts ship.graph(resource: '~winter-paches/top-shelf-6391').node(index: "170.141.184.505.207.751.870.046.689.877.378.990.080")
139
- a Node({:index=>"170.141.184.505.207.751.870.046.689.877.378.990.080", :author=>"witfyl-ravped", :contents=>[{"text"=>"the patches don't really bother me though tbh"}], :time_sent=>1629316468195, :is_parent=>false, :child_count=>0})
140
- =>
141
-
142
- # You can also reference a graph by its index in the graphs collection.
143
- > puts ship.graphs[3].node(index: "170.141.184.505.207.751.870.046.689.877.378.990.080")
144
- a Node({:index=>"170.141.184.505.207.751.870.046.689.877.378.990.080", :author=>"witfyl-ravped", :contents=>[{"text"=>"the patches don't really bother me though tbh"}], :time_sent=>1629316468195, :is_parent=>false, :child_count=>0})
145
- =>
146
-
147
- # Return the contents of the 5 oldest nodes of a graph
148
- > graph = ship.graph(resource: '~winter-paches/top-shelf-6391')
149
- > graph.oldest_nodes(count: 5).sort.each {|n| p n.contents};nil
150
- [{"text"=>"watching the 2020 stanley cup finals (tampa (sigh) just went up 2-0 in game 3) and i thought: \"the great north has to have a hockey chat, eh?\""}]
151
- [{"text"=>"we'll see if this has legs. ;)"}]
152
- [{"text"=>"shortie! now 2-1 tampa."}]
153
- [{"text"=>"looks like tampa's going to go up 2-1. as a canadian this geographically depresses me. :/"}]
154
- [{"text"=>"anyone in the stands?"}]
155
- =>
156
-
157
- # A single Node. In this case, the 3rd oldest node in the graph.
158
- > puts graph.nodes[2].contents
159
- {"text"=>"shortie! now 2-1 tampa."}
160
- =>
161
-
162
- # Getting the next newer Node. Remember that it always returns an Array, hence the '#first'.
163
- > puts graph.nodes[2].next.first.contents
164
- {"text"=>"looks like tampa's going to go up 2-1. as a canadian this geographically depresses me. :/"}
165
- =>
166
-
167
- # Return the indexes of the newest 5 nodes of a graph
168
- > ship.graph(resource: '~winter-paches/top-shelf-6391').newest_nodes(count: 5).sort.each {|n| p n.index};nil
169
- "170.141.184.505.209.257.330.601.508.862.548.770.816"
170
- "170.141.184.505.209.375.247.350.471.711.992.578.048"
171
- "170.141.184.505.209.545.972.004.310.065.795.301.376"
172
- "170.141.184.505.209.627.337.970.761.265.544.429.568"
173
- "170.141.184.505.209.644.102.846.398.558.514.446.336"
174
- =>
175
-
176
- # Fetching nodes older relative to another node. (See indexes above)
177
- > puts (node = ship.graph(resource: '~winter-paches/top-shelf-6391').node(index: "170.141.184.505.209.644.102.846.398.558.514.446.336"))
178
- a Node({:index=>"170.141.184.505.209.644.102.846.398.558.514.446.336", :author=>"winter-paches", :contents=>[{"text"=>"yep. that's how i did it as a kid. harry caray was the white sox announcer before he turned traitor and went to the cubs."}], :time_sent=>1629419046028, :is_parent=>false, :child_count=>0})
179
- =>
180
-
181
- > puts node.previous
182
- a Node({:index=>"170.141.184.505.209.627.337.970.761.265.544.429.568", :author=>"pathus-hiddyn", :contents=>[{"text"=>"Lol oh man I haven’t listened to a baseball game on the radio in forever. It is great isn’t it. "}], :time_sent=>1629418137668, :is_parent=>false, :child_count=>0})
183
- =>
184
-
185
- > node.previous(count: 4).each {|n| p n.index};nil
186
- "170.141.184.505.209.257.330.601.508.862.548.770.816"
187
- "170.141.184.505.209.375.247.350.471.711.992.578.048"
188
- "170.141.184.505.209.545.972.004.310.065.795.301.376"
189
- "170.141.184.505.209.627.337.970.761.265.544.429.568"
190
-
191
- #
192
- # --------------------------------------------------------------------
193
- # %settings-store
194
- # --------------------------------------------------------------------
195
- #
196
- > ship.setting(desk: 'landscape', bucket: 'calm').each {|e| p e};nil
197
- ["hideUtilities", false]
198
- ["hideGroups", false]
199
- ["hideAvatars", true]
200
- ["hideUnreads", true]
201
- ["hideNicknames", true]
202
-
203
- > ship.subscribe(app: 'settings-store', path: '/all')
204
- => a Channel (Open) on ~barsyr-latreb(name: 'Channel-0', key: '164375139513eacb')
205
-
206
- # We are now listening for changes in any settings on the ship. Go to Landscape and toggle the "Hide Groups" button...
207
- Received a Fact for [a Channel (Open) on ~barsyr-latreb(name: 'Channel-0', key: '164375139513eacb')] -- [message] -- [{"json":{"settings-event":{"put-entry":{"bucket-key":"calm","desk":"landscape","entry-key":"hideGroups","value":true}}},"id":1,"response":"diff"}]
208
-
209
- > ship.setting(desk: 'landscape', bucket: 'calm').each {|e| p e};nil
210
- ["hideUtilities", false]
211
- **["hideGroups", true]**
212
- ["hideAvatars", true]
213
- ["hideUnreads", true]
214
- ["hideNicknames", true]
215
-
216
- ```
217
- ### Configuration
218
-
219
- Configure your ship using a config file or constructor keyword arguments. Either or both can be used; the keyword args will override any values set via config file.
220
-
221
- Supported keys:
222
- - `code` - the auth code
223
- - `host` - the ship's host (e.g., 'localhost' or 'myship.net')
224
- - `name` - the ship's name (e.g, '~zod')
225
- - `port` - the open www port on your ship ('80' by default)
226
-
227
- #### Config File
228
-
229
- See [`_config.yml`](_config.yml) for an example config file. This will connect to a local fake zod, see creation instructions below.
230
-
231
- ```rb
232
- ship = Urbit.new(config_file: 'my-moon.yml')
233
- ```
234
-
235
- #### Constructor Keyword Arguments
236
-
237
- ```rb
238
- ship = Urbit.new(host: '127.0.0.1', port: '8080')
239
- ```
240
-
241
- ## Testing
242
-
243
- ```sh
244
- bin/test
245
- ```
246
- Tests assume that an instance of a ["fake" development Urbit ship](https://urbit.org/using/develop/) (one not connected to the live network) will be running, available at `http://localhost:8080`.
247
- ### "fake" ~zod
248
-
249
- To create this development ship:
250
- ```sh
251
- ./urbit -F zod
252
- ```
253
- ## Development
254
-
255
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
256
-
257
- To install this gem onto your local machine, run `bundle exec rake install`.
258
-
259
- ## Contributing
260
-
261
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/urbit-api.
262
-
263
-
264
- ## License
265
-
266
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
9
-
10
- task :default => :test
data/_config.yml DELETED
@@ -1,2 +0,0 @@
1
- code: 'lidlut-tabwed-pillex-ridrup'
2
- ship: '~zod'
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "pry"
5
- require "urbit/urbit"
6
-
7
- puts "Welcome! This is an interactive environment to explore your Urbit ship."
8
- puts "You create a config file with connection details for your ship and off you go."
9
- puts ""
10
- puts "e.g., ship = Urbit.new(config_file: 'my_config.yml')"
11
- puts "=> a Ship(name: '~barsyr-latreb', host: 'http://localhost', port: '8080')"
12
-
13
- Pry.config.print = proc { |output, value| output.puts "=> #{value}" }
14
- Pry.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/bin/test DELETED
@@ -1,2 +0,0 @@
1
- #!/bin/sh
2
- bundle exec rspec -f d spec
@@ -1,5 +0,0 @@
1
- module Urbit
2
- module Api
3
- VERSION = "0.3.0"
4
- end
5
- end
data/lib/urbit/setting.rb DELETED
@@ -1,30 +0,0 @@
1
-
2
- module Urbit
3
- class Setting
4
- attr_reader :bucket
5
-
6
- def initialize(ship:, desk:, setting:)
7
- @ship = ship
8
- @desk = desk
9
- @bucket = setting.first
10
- @entries = setting.last
11
- end
12
-
13
- def entries(bucket: nil)
14
- return @entries if (bucket.nil? || @bucket == bucket)
15
- {}
16
- end
17
-
18
- def to_h
19
- {
20
- desk: @desk,
21
- bucket: self.bucket,
22
- entries: self.entries
23
- }
24
- end
25
-
26
- def to_s
27
- "a Setting(#{self.to_h})"
28
- end
29
- end
30
- end
@@ -1,51 +0,0 @@
1
- {
2
- :status => 200,
3
- :code => "ok",
4
- :body =>" {
5
- "graph-update": {
6
- "add-graph": {
7
- "graph":{},
8
- "resource" : {
9
- "name": "dec74689ad",
10
- "ship": "zod"
11
- },
12
- "mark" : "graph-validator-chat",
13
- "overwrite":true
14
- }
15
- }
16
- }
17
- }
18
-
19
-
20
- {
21
- "status": 200,
22
- "code": "ok",
23
- "body": {
24
- "graph-update": {
25
- "add-graph": {
26
- "graph": {
27
- "170141184505196673936784618510385938432": {
28
- "post" : {
29
- "index": "/170141184505196673936784618510385938432",
30
- "author": "zod",
31
- "time-sent": 1628715932642,
32
- "signatures": [
33
- {"signature": "0x2.7d8e.58d0.ee70.c720.e0c7.0fbe.40be.f68c.0401.950e.1bb8.9eda.cb66.3726.8995.3ca2.2d51.aa34.fcc8.ea00.1193.9145.38c9.7fea.8285.bd4e.d390.a195.f7e6.0870.5f7c.c73b.67a7.d19c.375b.fc29.aac7.6879.04fa.6a0f.cb7f.9001", "life": 1 ,"ship": "zod\}
34
- ],
35
- "contents": [
36
- {"text" : "test?"}
37
- ],
38
- "hash": "0x9f63.9634.3b9c.31c8.3831.c3ef.902f.bda3"},
39
- "children":null
40
- }
41
- },
42
- "resource" : {
43
- "name": "dec74689ad",
44
- "ship": "zod"
45
- },
46
- "mark": "graph-validator-chat",
47
- "overwrite": true
48
- }
49
- }
50
- }
51
- }
@@ -1,15 +0,0 @@
1
- {
2
- :status => 200,
3
- :code => "ok",
4
- :body => {
5
- "graph-update": {
6
- "keys": [
7
- {"name": "announce", "ship": "darlur"},
8
- {"name": "test0-996", "ship": "barsyr-latreb"},
9
- {"name": "test1-4287", "ship": "barsyr-latreb"},
10
- {"name": "welcome-to-urbit-community", "ship": "darrux-landes"},
11
- {"name": "help-desk-4556", "ship": "darlur"}
12
- ]
13
- }
14
- }
15
- }
@@ -1,34 +0,0 @@
1
- [1] pry(main)> ship = Urbit.connect(config_file: '_config-barsyr-latreb.yml')
2
- => a Ship(name: '~barsyr-latreb', host: 'http://localhost', port: '8080')
3
-
4
- [2] pry(main)> ship.scry('graph-store', "/graph/~darlur/announce/node/siblings/newest/lone/1")
5
- =>
6
- :status => 200,
7
- :code => "ok",
8
- :body => {
9
- "graph-update": {
10
- "add-nodes": {
11
- "resource": {
12
- "name": "announce",
13
- "ship": "darlur"
14
- },
15
- "nodes" : {
16
- "/170141184505036957608427254348286787584": {
17
- "post" : {
18
- "index": "/170141184505036957608427254348286787584",
19
- "author": "darlur",
20
- "time-sent": 1620057693019,
21
- "signatures": [
22
- {"signature": "0x5468.e5ec.1955.3e10.14a6.5fc0.054e.0e1b.fe01.1272.0a2c.e3c8.37a5.6717.ed7d.4b0c.3102.3966.4caa.edeb.e89e.3194.be17.f6a7.0622.4775.5e8f.7e92.16d2.c552.5ecd.d28b.17a6.aad5.089b.3623.eb8b.1b62.1525.0571.2d9f.9001", "life ": 3, "ship": "darlur"}
23
- ],
24
- "contents": [
25
- {\"text\":\"We are now running urbit v1.5."}
26
- ],
27
- "hash": "0x5468.e5ec.1955.3e10.14a6.5fc0.054e.0e1b"
28
- },
29
- "children":null
30
- }
31
- }
32
- }
33
- }
34
- }
@@ -1,76 +0,0 @@
1
- [8] pry(main)> channel.receiver.facts.each {|f| puts f};nil
2
- {:message => {
3
- "ok" => "ok",
4
- "id" => 1,
5
- "response" => "subscribe"}
6
- }
7
- {:message => {
8
- "json" => {
9
- "graph-update" => {
10
- "add-nodes" => {
11
- "resource" => {
12
- "name" => "top-shelf-6391",
13
- "ship" => "winter-paches"
14
- },
15
- "nodes" => {
16
- "/170141184505207442993270453156437819392" => {
17
- "post" => {
18
- "index"=>"/170141184505207442993270453156437819392",
19
- "author"=>"winter-paches",
20
- "time-sent"=>1629299723410,
21
- "signatures"=>[{"signature"=>"0x1.5003.94a6.2a10.7baf.ba44.a4d9.0353.e61a.0200.fdb2.fccf.f760.e1a0.bd20.dafa.f17e.e759.c8ab.f3b2.bb03.ccfa.1f10.c060.b063.cf32.48f6.ce27.4cae.462a.a228.47e9.5642.6476.5664.a918.839b.4053.91fe.b08c.f18c.525f.7001", "life"=>3, "ship"=>"winter-paches"}],
22
- "contents"=>[{"text"=>"i will be really sad if hockey goes even more the way of the other sports."}],
23
- "hash"=>"0xa801.ca53.1508.3dd7.dd22.526c.81a9.f30d"},
24
- "children"=>nil
25
- }
26
- }
27
- }
28
- }
29
- }, "id"=>1, "response"=>"diff"}}
30
- {:message => {
31
- "json" => {
32
- "graph-update"=>{"add-nodes"=>{"resource"=>{"name"=>"top-shelf-6391", "ship"=>"winter-paches"}, "nodes"=>{"/170141184505207446323799471187231244288"=>{"post"=>{"index"=>"/170141184505207446323799471187231244288", "author"=>"rivlyt-dotnet", "time-sent"=>1629299904766, "signatures"=>[{"signature"=>"0x668d.5edb.31d1.18ee.fb3a.7bd0.e6e6.6582.fe01.d7c0.61a7.aadf.c1b0.7e9c.26ad.8412.c3a5.6221.eff0.d25f.f505.18d9.693c.a888.debd.635d.c692.b138.9f5e.d52d.513d.291f.326b.2261.4a08.7680.58d0.e654.3556.bbd5.d43f.9001", "life"=>1, "ship"=>"rivlyt-dotnet"}], "contents"=>[{"url"=>"http://www.hockeyworldblog.com/wp-content/uploads/2009/07/SamiKapanenKalPa.jpg"}, {"text"=>""}], "hash"=>"0x668d.5edb.31d1.18ee.fb3a.7bd0.e6e6.6582"}, "children"=>nil}}}}}, "id"=>1, "response"=>"diff"}}
33
- {:message => {
34
- "json" => {
35
- "graph-update" => {
36
- "add-nodes" => {
37
- "resource" => {
38
- "name" => "dm-inbox",
39
- "ship" => "barsyr-latreb"
40
- },
41
- "nodes" => {
42
- "/3830645248/170141184505207462626569476439992696832" => {
43
- "post" => {
44
- "index" => "/3830645248/170141184505207462626569476439992696832",
45
- "author" => "winter-paches",
46
- "time-sent" => 1629300788090,
47
- "signatures" => [
48
- {"signature" => "0x8b2.4b04.d55d.38fb.3561.6840.7312.2c5d.3e80.6494.9c69.0c8c.5480.21d8.87e1.93d4.79ca.e299.8482.17d6.b1d5.075f.837e.e1c9.9776.1a10.1710.f62a.6f68.8415.e85f.62c9.ff0f.b5b7.e605.bb8f.ee6e.d856.8505.08eb.901f.5001",
49
- "life"=>3,
50
- "ship"=>"winter-paches"}
51
- ],
52
- "contents"=>[
53
- {"text"=>"still there?"}
54
- ],
55
- "hash" => "0x22c9.2c13.5574.e3ec.d585.a101.cc48.b174"
56
- },
57
- "children" => {
58
- "170141184505210800341365283904498434048" :{
59
- "post" : {
60
- "index": "/3830645248/170141184505210800341365283904498434048",
61
- "author": "winter-paches",
62
- "time-sent\":1629481725905,
63
- "signatures\":[{\"signature\":\"0x2cbc.3fa5.5e05.1851.0bc0.c139.7356.86dc.fa01.24bf.82c7.078d.59b7.7365.de54.87de.6043.7cca.1bcc.5746.cb4e.6585.f81e.ab97.edf4.9b5e.e499.1df3.486f.965b.0247.6cdd.8ed8.2a70.37f1.f9ec.97dd.6d55.19f5.0b0d.e17f.9001\",\"life\":3,\"ship\":\"winter-paches\"}],
64
- "contents\":[{\"text\":\"two\"}],
65
- "hash\":\"0x2cbc.3fa5.5e05.1851.0bc0.c139.7356.86dc\"
66
- },
67
- "children": null
68
- }
69
- }
70
- }
71
- }
72
- }
73
- }
74
- },
75
- "id"=>1,
76
- "response"=>"diff"}}
@@ -1,20 +0,0 @@
1
- {
2
- :message=> {
3
- "json"=> {
4
- "graph-update"=> {
5
- "add-graph"=> {
6
- "graph" => {
7
- },
8
- "resource" => {
9
- "name" => "test1-4287",
10
- "ship" => "barsyr-latreb"
11
- },
12
- "mark" => "graph-validator-publish",
13
- "overwrite" => true
14
- }
15
- }
16
- },
17
- "id" => 2,
18
- "response" => "diff"
19
- }
20
- }
@@ -1,75 +0,0 @@
1
- {
2
- :message => {
3
- "json" => {
4
- "graph-update" => {
5
- "add-nodes" => {
6
- "resource" => {
7
- "name" => "test1-4287",
8
- "ship" => "barsyr-latreb"
9
- },
10
- "nodes" => {
11
- "/170141184505020984719232265951207489536/2" => {
12
- "post" => {
13
- "index" => "/170141184505020984719232265951207489536/2",
14
- "author" => "barsyr-latreb",
15
- "time-sent" => 1619191801085,
16
- "signatures"=> [
17
- {
18
- "signature" => "0x1.284d.9ddd.b0ca.3b77.ce22.bea4.4fad.1018.0200.fb46.de9e.541a.7c0d.c680.20a3.986c.ce0f.944b.4f48.cdb1.64aa.bc8a.ce34.c7ee.bcc4.47ce.7dd2.8b98.12b8.c69b.98ae.73e3.3a40.592e.11b2.1445.6cbf.bfbc.6e60.6815.e1bf.7001",
19
- "life"=>3,
20
- "ship"=>"barsyr-latreb"
21
- }
22
- ],
23
- "contents" => [],
24
- "hash" =>"0x9426.ceee.d865.1dbb.e711.5f52.27d6.880c"
25
- },
26
- "children" => nil
27
- },
28
- "/170141184505020984719232265951207489536/1/1" => {
29
- "post" => {
30
- "index" => "/170141184505020984719232265951207489536/1/1",
31
- "author" => "barsyr-latreb",
32
- "time-sent" =>1619191801085,
33
- "signatures" => [
34
- {
35
- "signature" => "0x4abf.c85f.4db6.bda6.a5ca.155c.f479.c1ee.0080.36c0.7fc4.fc07.5492.fba6.0eac.bcd1.6cde.3f05.46cb.7654.cb78.8baa.f398.37d6.5098.a7ce.6a07.6cfe.5f99.6ee2.b3a1.6717.ac2d.c396.6a86.5495.d88e.fc55.cbbf.0e1e.70ff.3001",
36
- "life" =>3,
37
- "ship" => "barsyr-latreb"
38
- }
39
- ],
40
- "contents" => [
41
- {"text" => "Post 1"},
42
- {"text" => "First post of the graph store portion of the airlock implementation."}
43
- ],
44
- "hash" => "0x957f.90be.9b6d.7b4d.4b94.2ab9.e8f3.83dc"
45
- },
46
- "children" => nil
47
- },
48
- "/170141184505020984719232265951207489536"=>
49
- {"post"=>
50
- {"index"=>"/170141184505020984719232265951207489536",
51
- "author"=>"barsyr-latreb",
52
- "time-sent"=>1619191801085,
53
- "signatures"=>
54
- [{"signature"=>
55
- "0x6401.1904.eca5.c18c.d9a4.cf52.d00d.6bc5.8080.247c.6a06.3709.44ce.ad7e.fd14.bccb.c982.3df6.dba3.c727.cccd.f433.47b5.2342.780c.0b27.4fd8.85eb.4c67.5466.565c.3fc6.66c5.1832.72da.2557.940b.3549.14a7.66ab.e1df.3001",
56
- "life"=>3,
57
- "ship"=>"barsyr-latreb"}],
58
- "contents"=>[],
59
- "hash"=>"0xc802.3209.d94b.8319.b349.9ea5.a01a.d78b"},
60
- "children"=>nil},
61
- "/170141184505020984719232265951207489536/1"=>
62
- {"post"=>
63
- {"index"=>"/170141184505020984719232265951207489536/1",
64
- "author"=>"barsyr-latreb",
65
- "time-sent"=>1619191801085,
66
- "signatures"=>
67
- [{"signature"=>
68
- "0x1.284d.9ddd.b0ca.3b77.ce22.bea4.4fad.1018.0200.fb46.de9e.541a.7c0d.c680.20a3.986c.ce0f.944b.4f48.cdb1.64aa.bc8a.ce34.c7ee.bcc4.47ce.7dd2.8b98.12b8.c69b.98ae.73e3.3a40.592e.11b2.1445.6cbf.bfbc.6e60.6815.e1bf.7001",
69
- "life"=>3,
70
- "ship"=>"barsyr-latreb"}],
71
- "contents"=>[],
72
- "hash"=>"0x9426.ceee.d865.1dbb.e711.5f52.27d6.880c"},
73
- "children"=>nil}}}}},
74
- "id"=>2,
75
- "response"=>"diff"}}
data/misc/post DELETED
@@ -1,12 +0,0 @@
1
- "post" => {
2
- "index" => "/170141184504863525594513045663867817951",
3
- "author" => "barsyr-latreb",
4
- "time-sent" => 1610655924876,
5
- "signatures" => [],
6
- "contents" => [
7
- {"text" => "~all : another new planet has coalesced..."},
8
- {"mention"=> "barsyr-latreb"},
9
- {"text" => "."}
10
- ],
11
- "hash" => nil
12
- },