Class: ComerDeTapas::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/comer_de_tapas/client.rb

Instance Method Summary collapse

Instance Method Details

#download(force: false) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/comer_de_tapas/client.rb', line 20

def download(force: false)
  fetch_episodes!(force)
  prepare_save_folder!
  authenticate
  load_episodes
  download_all_tapas!
end

#init!Object

Initialize comer de tapas $ mkdir -p ~/.rubytapas/ $ touch ~/.rubytapas/.credentials



12
13
14
15
16
17
18
# File 'lib/comer_de_tapas/client.rb', line 12

def init!
  if RUBYTAPAS_DIR.exist? && CREDENTIAL_FILE.exist?
    abort "Credentials found. type `comer_de_tapas download` to download."
  end
  create_rubytapas_files!
  puts "~/.rubytapas/.credentials folder and file has been created."
end