Class Algorithmia


  • public final class Algorithmia
    extends java.lang.Object
    Instantiate Algorithmia clients for calling algorithms and accessing data
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Algorithm algo​(java.lang.String algoUri)
      Initialize an Algorithm object using the default client
      static AlgorithmiaClient client()
      Returns the default Algorithmia client which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static AlgorithmiaClient client​(int maxConnections)
      Returns the default Algorithmia client which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static AlgorithmiaClient client​(java.lang.String simpleKey)
      Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static AlgorithmiaClient client​(java.lang.String simpleKey, int maxConnections)
      Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static AlgorithmiaClient client​(java.lang.String simpleKey, java.lang.String apiAddress)
      Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static AlgorithmiaClient client​(java.lang.String simpleKey, java.lang.String apiAddress, int maxConnections)
      Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
      static DataDirectory dir​(java.lang.String path)
      Initialize a DataDirectory object using the default client
      static DataFile file​(java.lang.String path)
      Initialize an DataFile object using the default client
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • client

        public static AlgorithmiaClient client()
        Returns the default Algorithmia client which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Returns:
        an Algorithmia client
      • client

        public static AlgorithmiaClient client​(int maxConnections)
        Returns the default Algorithmia client which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Parameters:
        maxConnections - max number of concurrent connections to hold open to Algorithmia
        Returns:
        an Algorithmia client
      • client

        public static AlgorithmiaClient client​(java.lang.String simpleKey)
        Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Parameters:
        simpleKey - API Key for simple authentication (prefixed with "sim")
        Returns:
        an Algorithmia client
      • client

        public static AlgorithmiaClient client​(java.lang.String simpleKey,
                                               java.lang.String apiAddress)
        Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Parameters:
        simpleKey - API Key for simple authentication (prefixed with "sim")
        Returns:
        an Algorithmia client
      • client

        public static AlgorithmiaClient client​(java.lang.String simpleKey,
                                               int maxConnections)
        Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Parameters:
        simpleKey - API Key for simple authentication (prefixed with "sim")
        maxConnections - max number of concurrent connections to hold open to Algorithmia
        Returns:
        an Algorithmia client
      • client

        public static AlgorithmiaClient client​(java.lang.String simpleKey,
                                               java.lang.String apiAddress,
                                               int maxConnections)
        Builds an Algorithmia client that makes all requests with your API key If API key is null, the default client is returned, which will look for ALGORITHMIA_API_KEY environment variable or java property If no key is found, then requests will be unauthenticated which only works when making requests from an algorithm running within the Algorithmia cluster
        Parameters:
        simpleKey - API Key for simple authentication (prefixed with "sim")
        maxConnections - max number of concurrent connections to hold open to Algorithmia
        Returns:
        an Algorithmia client
      • algo

        public static Algorithm algo​(java.lang.String algoUri)
        Initialize an Algorithm object using the default client
        Parameters:
        algoUri - the algorithm's URI, e.g., algo://user/algoname
        Returns:
        an Algorithm client for the specified algorithm
      • dir

        public static DataDirectory dir​(java.lang.String path)
        Initialize a DataDirectory object using the default client
        Parameters:
        path - to a data directory, e.g., data://.my/foo
        Returns:
        a DataDirectory client for the specified directory
      • file

        public static DataFile file​(java.lang.String path)
        Initialize an DataFile object using the default client
        Parameters:
        path - to a data file, e.g., data://.my/foo/bar.txt
        Returns:
        a DataFile client for the specified file