Skip to content

Commit 9d4244b

Browse files
committed
Updated pin api to IPFS 0.4.1 (Pinned -> Pins)
1 parent 388f377 commit 9d4244b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public List<Multihash> local() throws IOException {
109109
*/
110110
public class Pin {
111111
public List<Multihash> add(Multihash hash) throws IOException {
112-
return ((List<Object>)((Map)retrieveAndParse("pin/add?stream-channels=true&arg=" + hash)).get("Pinned"))
112+
return ((List<Object>)((Map)retrieveAndParse("pin/add?stream-channels=true&arg=" + hash)).get("Pins"))
113113
.stream()
114114
.map(x -> Multihash.fromBase58((String)x))
115115
.collect(Collectors.toList());
@@ -131,7 +131,7 @@ public List<Multihash> rm(Multihash hash) throws IOException {
131131

132132
public List<Multihash> rm(Multihash hash, boolean recursive) throws IOException {
133133
Map json = retrieveMap("pin/rm?stream-channels=true&r=" + recursive + "&arg=" + hash);
134-
return ((List<Object>) json.get("Pinned")).stream().map(x -> Multihash.fromBase58((String) x)).collect(Collectors.toList());
134+
return ((List<Object>) json.get("Pins")).stream().map(x -> Multihash.fromBase58((String) x)).collect(Collectors.toList());
135135
}
136136
}
137137

0 commit comments

Comments
 (0)