Skip to content

Instantly share code, notes, and snippets.

@rectifyer
rectifyer / tvdb.rb
Last active March 10, 2023 01:15
Get images from TVDB
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', {
@rectifyer
rectifyer / tmdb.rb
Created October 11, 2016 17:38
Get images from TMDB
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']
@rectifyer
rectifyer / fanarttv.rb
Last active June 24, 2019 02:45
Get Images from Fanart.tv
require 'httparty'
# Fanart.tv
FANART_API_KEY = '[your api key]'
FANART_CLIENT_KEY = '[your client key]'
# --------------------
# movie iamges
tmdb_id = 20526 # Tron: Legacy