This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
# TVDB | |
TVDB_API_KEY = '[your api key]' | |
TVDB_USERNAME = '[your username]' | |
TVDB_USERKEY = '[your user key]' | |
image_prefix = 'http://thetvdb.com/banners/' | |
# get token | |
response = HTTParty.post('https://api.thetvdb.com/login', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
# TMDB | |
TMDB_API_KEY = '[your api key]' | |
# get configuration parameters | |
response = HTTParty.get("https://api.themoviedb.org/3/configuration?api_key=#{TMDB_API_KEY}") | |
config = JSON.parse(response.body) | |
image_prefix = config['images']['secure_base_url'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
# Fanart.tv | |
FANART_API_KEY = '[your api key]' | |
FANART_CLIENT_KEY = '[your client key]' | |
# -------------------- | |
# movie iamges | |
tmdb_id = 20526 # Tron: Legacy |