private static TraktV2 createTraktApi() { TraktV2 api = new TraktV2(CLIENT_ID, ApiKey.decryptApikey("VD2h4jmnrrYWnP1Nk49UtTNRILiWsuelJKdza7DAw+ROh1wtVf2U6PQScm7QWCOTsxN0K3QluIykKs2ZT1af1GcPz1401005bDBDss1Pz2c="), "urn:ietf:wg:oauth:2.0:oob") { // tell the trakt api to use our OkHttp client @Override protected synchronized OkHttpClient okHttpClient() { OkHttpClient.Builder builder = TmmHttpClient.newBuilder(); builder.addInterceptor(new TraktV2Interceptor(this)); return builder.build(); } }; return api; }
private static synchronized void initRottenTomatoesApiInstance() throws Exception { // create a new instance of the rottentomatoes api if (api == null) { try { api = new RottenTomatoes(ApiKey.decryptApikey("O0HBqxsoTCzaT3lTxVxmoMji3yzUuXSRbnMTRLnkHY4=")); } catch (Exception e) { LOGGER.error("RottenTomatoesMetadataProvider", e); throw e; } } }
private static synchronized void initAPI() throws Exception { if (api == null) { try { api = new MovieMeter(ApiKey.decryptApikey("GK5bRYdcKs3WZzOCa1fOQfIeAJVsBP7buUYjc0q4x2/jX66BlSUDKDAcgN/L0JnM")); // api.setIsDebug(true); } catch (Exception e) { LOGGER.error("MoviemeterMetadataProvider", e); throw e; } } }
private static synchronized void initAPI() throws Exception { // create a new instance of the tmdb api if (api == null) { api = new Tmdb(ApiKey.decryptApikey("dj5KmN0AO0eFDMF1tybX3H+zxGpfm4pUQAlEhM3iah/g2kuCzUQVZiiJ+ceCP2DO")) { // tell the tmdb api to use our OkHttp client @Override protected synchronized OkHttpClient okHttpClient() { OkHttpClient.Builder builder = TmmHttpClient.newBuilder(true); // log http calls if (LOGGER.isTraceEnabled()) { HttpLoggingInterceptor logging = new HttpLoggingInterceptor(); logging.setLevel(Level.BASIC); builder.addInterceptor(logging); } builder.addInterceptor(new TmdbInterceptor(this)); return builder.build(); } }; configuration = api.configurationService().configuration().execute().body(); if (configuration == null) { throw new Exception("Invalid TMDB API key"); } } }
private static synchronized void initAPI() throws Exception { if (tvdb == null) { try { tvdb = new TheTvdb(ApiKey.decryptApikey("7bHHg4k0XhRERM8xd3l+ElhMUXOA5Ou4vQUEzYLGHt8=")) { // tell the tmdb api to use our OkHttp client private OkHttpClient okHttpClient; @Override protected synchronized OkHttpClient okHttpClient() { if (this.okHttpClient == null) { OkHttpClient.Builder builder = TmmHttpClient.newBuilder(); this.setOkHttpClientDefaults(builder); this.okHttpClient = builder.build(); } return this.okHttpClient; } }; TheTvDbConnectionCounter.trackConnections(); LanguagesResponse response = tvdb.languages().allAvailable().execute().body(); tvdbLanguages = response.data; } catch (Exception e) { LOGGER.error("TheTvDbMetadataProvider", e); throw e; } } }
public FanartTvMetadataProvider() throws Exception { if (api == null) { try { api = new FanartTv(ApiKey.decryptApikey("2gkQtSYPIxfyThxPXveHiCGXEcqJJwClUDrB5JV60OnQeQ85Ft65kFIk1SBKoge3")); } catch (Exception e) { LOGGER.error("FanartTvMetadataProvider", e); throw e; } } // configure/load settings providerInfo.getConfig().addText("clientKey", "", true); providerInfo.getConfig().load(); if (StringUtils.isNotBlank(providerInfo.getConfig().getValue("clientKey"))) { api.setClientKey(providerInfo.getConfig().getValue("clientKey")); } }