Exemplo n.º 1
0
  public static AlchemyAPI_JSON GetInstanceFromProperties() {
    AlchemyAPI_JSON api = new AlchemyAPI_JSON();

    try {
      api.SetAPIKey(new PropertiesManager().getExtractorKey("AlchemyApi"));
    } catch (Exception e) {
      // If an exception occurs log the error
      logger.error("Exception Message: " + e.getMessage(), e);
      return null;
    }

    return api;
  }
Exemplo n.º 2
0
  public static AlchemyAPI_JSON GetInstanceFromString(String apiKey) {
    AlchemyAPI_JSON api = new AlchemyAPI_JSON();
    api.SetAPIKey(apiKey);

    return api;
  }