File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22import com .bloock .sdk .client .AvailabilityClient ;
33import com .bloock .sdk .client .RecordClient ;
44import com .bloock .sdk .entity .availability .HostedPublisher ;
5+ import com .bloock .sdk .entity .availability .PublishResponse ;
56import com .bloock .sdk .entity .record .Record ;
67
78public class PublishHosted {
@@ -14,7 +15,9 @@ public static void main(String[] args) throws Exception {
1415
1516 Record record = recordClient .fromString ("Hello world" ).build ();
1617
17- String id = availabilityClient .publish (record , new HostedPublisher ()); // it returns the hash
18+ PublishResponse response = availabilityClient .publish (record , new HostedPublisher ());
19+ String id = response .getID ();
20+
1821 } catch (Exception e ) {
1922 System .out .println (e );
2023 }
Original file line number Diff line number Diff line change 22import com .bloock .sdk .client .AvailabilityClient ;
33import com .bloock .sdk .client .RecordClient ;
44import com .bloock .sdk .entity .availability .IpfsPublisher ;
5+ import com .bloock .sdk .entity .availability .PublishResponse ;
56import com .bloock .sdk .entity .record .Record ;
67
78public class PublishIpfs {
@@ -14,8 +15,9 @@ public static void main(String[] args) throws Exception {
1415 Record record = recordClient
1516 .fromString ("Hello world" )
1617 .build ();
17-
18- String id = availabilityClient .publish (record , new IpfsPublisher ());
18+
19+ PublishResponse response = availabilityClient .publish (record , new IpfsPublisher ());
20+ String id = response .getID ();
1921
2022 System .out .println ("Record was published successfully" );
2123 }
You can’t perform that action at this time.
0 commit comments