@@ -160,7 +160,7 @@ public Map resolve(String scheme, Multihash hash, boolean recursive) throws IOEx
160160 return retrieveMap ("resolve?arg=/" + scheme +"/" +hash +"&r=" +recursive );
161161 }
162162
163-
163+ @ Deprecated
164164 public String dns (String domain , boolean recursive ) throws IOException {
165165 Map res = retrieveMap ("dns?arg=" + domain + "&r=" + recursive );
166166 return (String )res .get ("Path" );
@@ -353,14 +353,15 @@ public Map stat(Multihash hash) throws IOException {
353353 /* 'ipfs object' is a plumbing command used to manipulate DAG objects directly. {Object} is a subset of {Block}
354354 */
355355 public class IPFSObject {
356+ @ Deprecated
356357 public List <MerkleNode > put (List <byte []> data ) throws IOException {
357358 Multipart m = new Multipart (protocol +"://" + host + ":" + port + version +"object/put?stream-channels=true" , "UTF-8" );
358359 for (byte [] f : data )
359360 m .addFilePart ("file" , Paths .get ("" ), new NamedStreamable .ByteArrayWrapper (f ));
360361 String res = m .finish ();
361362 return JSONParser .parseStream (res ).stream ().map (x -> MerkleNode .fromJSON ((Map <String , Object >) x )).collect (Collectors .toList ());
362363 }
363-
364+ @ Deprecated
364365 public List <MerkleNode > put (String encoding , List <byte []> data ) throws IOException {
365366 if (!"json" .equals (encoding ) && !"protobuf" .equals (encoding ))
366367 throw new IllegalArgumentException ("Encoding must be json or protobuf" );
@@ -370,33 +371,33 @@ public List<MerkleNode> put(String encoding, List<byte[]> data) throws IOExcepti
370371 String res = m .finish ();
371372 return JSONParser .parseStream (res ).stream ().map (x -> MerkleNode .fromJSON ((Map <String , Object >) x )).collect (Collectors .toList ());
372373 }
373-
374+ @ Deprecated
374375 public MerkleNode get (Multihash hash ) throws IOException {
375376 Map json = retrieveMap ("object/get?stream-channels=true&arg=" + hash );
376377 json .put ("Hash" , hash .toBase58 ());
377378 return MerkleNode .fromJSON (json );
378379 }
379-
380+ @ Deprecated
380381 public MerkleNode links (Multihash hash ) throws IOException {
381382 Map json = retrieveMap ("object/links?stream-channels=true&arg=" + hash );
382383 return MerkleNode .fromJSON (json );
383384 }
384-
385+ @ Deprecated
385386 public Map <String , Object > stat (Multihash hash ) throws IOException {
386387 return retrieveMap ("object/stat?stream-channels=true&arg=" + hash );
387388 }
388-
389+ @ Deprecated
389390 public byte [] data (Multihash hash ) throws IOException {
390391 return retrieve ("object/data?stream-channels=true&arg=" + hash );
391392 }
392-
393+ @ Deprecated
393394 public MerkleNode _new (Optional <String > template ) throws IOException {
394395 if (template .isPresent () && !ObjectTemplates .contains (template .get ()))
395396 throw new IllegalStateException ("Unrecognised template: " +template .get ());
396397 Map json = retrieveMap ("object/new?stream-channels=true" +(template .isPresent () ? "&arg=" + template .get () : "" ));
397398 return MerkleNode .fromJSON (json );
398399 }
399-
400+ @ Deprecated
400401 public MerkleNode patch (Multihash base , String command , Optional <byte []> data , Optional <String > name , Optional <Multihash > target ) throws IOException {
401402 if (!ObjectPatchTypes .contains (command ))
402403 throw new IllegalStateException ("Illegal Object.patch command type: " +command );
@@ -445,6 +446,7 @@ public String resolve(Multihash hash) throws IOException {
445446 }
446447
447448 public class DHT {
449+ @ Deprecated
448450 public List <Map <String , Object >> findprovs (Multihash hash ) throws IOException {
449451 return getAndParseStream ("dht/findprovs?arg=" + hash ).stream ()
450452 .map (x -> (Map <String , Object >) x )
@@ -454,21 +456,22 @@ public List<Map<String, Object>> findprovs(Multihash hash) throws IOException {
454456 public Map query (Multihash peerId ) throws IOException {
455457 return retrieveMap ("dht/query?arg=" + peerId .toString ());
456458 }
457-
459+ @ Deprecated
458460 public Map findpeer (Multihash id ) throws IOException {
459461 return retrieveMap ("dht/findpeer?arg=" + id .toString ());
460462 }
461-
463+ @ Deprecated
462464 public Map get (Multihash hash ) throws IOException {
463465 return retrieveMap ("dht/get?arg=" + hash );
464466 }
465-
467+ @ Deprecated
466468 public Map put (String key , String value ) throws IOException {
467469 return retrieveMap ("dht/put?arg=" + key + "&arg=" +value );
468470 }
469471 }
470472
471473 public class File {
474+ @ Deprecated
472475 public Map ls (Multihash path ) throws IOException {
473476 return retrieveMap ("file/ls?arg=" + path );
474477 }
0 commit comments