Skip to content

Commit 07ca478

Browse files
committed
Implement argumentless id call
1 parent 1e6d689 commit 07ca478

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/io/ipfs/api/IPFS.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@ public Map id(String target) throws IOException {
501501
return retrieveMap("id/" + target.toString());
502502
}
503503

504+
public Map id() throws IOException {
505+
return retrieveMap("id");
506+
}
507+
504508
public class Stats {
505509
public Map bw() throws IOException {
506510
return retrieveMap("stats/bw");

src/test/java/io/ipfs/api/APITest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,12 @@ public void dhtTest() throws IOException {
592592
Map find = ipfs.dht.findpeer(peers.get(0).id);
593593
}
594594

595+
@Test
596+
public void localId() throws Exception {
597+
Map id = ipfs.id();
598+
System.out.println();
599+
}
600+
595601
@Test
596602
public void statsTest() throws IOException {
597603
Map stats = ipfs.stats.bw();

0 commit comments

Comments
 (0)