Refresh samples + add new ones for YouTube, Analytics

This commit is contained in:
Steve Bazyl committed 2016-01-07 11:41:45 -08:00
1 parent 1715fc9945
commit fd4ff04266
15 files changed
+622 -165

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env ruby
$:.unshift(File.expand_path("../lib", __FILE__))
require 'thor'
require 'dotenv'
# Small script to allow executing samples from the command line.
# Each sample is loaded as a subcommand.
#
# Example usage:
#
# google-api-samples drive upload myfile.txt
#
#
class App < Thor
# Load all the samples and register them as subcommands
Dir.glob('./lib/samples/*.rb').each do |file|
require file
end
Samples.constants.each do |const|
desc const.downcase, "#{const} samples"
subcommand const.downcase, Samples.const_get(const)
end
end
Dotenv.load
App.start(ARGV)