This file contains hidden or 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 'csv' | |
namespace :csv do | |
desc "generates a migration file from column names from the CSV headers" | |
task create_migration: :environment do | |
def headers_from_CSV (filename) | |
csv_header_array = CSV.read(filename, headers: true).headers | |
return csv_header_array.map { |col_a| col_a.strip.downcase.gsub(' ', '_').gsub('.', '_') } | |
end |
This file contains hidden or 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
# NOTE: Be sure to set the API key further down in the code! | |
require "net/http" | |
require "uri" | |
require "json" | |
class WIP | |
def initialize(api_key:) | |
@api_key = api_key | |
end |
This file contains hidden or 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 'pp' | |
require 'upwork/api' | |
# require 'upwork/api/routers/auth' | |
# require 'upwork/api/routers/organization/users' | |
require 'upwork/api/routers/jobs/search' | |
# step 1 | |
config = Upwork::Api::Config.new({ | |
'consumer_key' => 'x', | |
'consumer_secret' => 'x', |
NewerOlder