<commit_before>require 'sinatra'
require 'haml'
require 'sass'

DEV_SECRET = "0942956f9eeea22688d8717ec9e12955"
APP_NAME = "ollert"

class Ollert < Sinatra::Base
  get '/' do
    @secret = DEV_SECRET
    haml :landing
  end

  get '/connect' do
    "Holy cow I received the following token: #{params[:token]}"
  end

  get '/styles.css' do
    scss :styles
  end
end<commit_msg>connecting and getting the user works now<commit_after>require 'sinatra'
require 'haml'
require 'sass'
require 'trello'
require 'active_support/inflector'

PUBLIC_KEY = "0942956f9eeea22688d8717ec9e12955"
APP_NAME = "ollert"

class Ollert < Sinatra::Base
  get '/' do
    @secret = PUBLIC_KEY
    haml :landing
  end

  get '/connect' do
    client = Trello::Client.new(
      :developer_public_key => PUBLIC_KEY,
      :member_token => params[:token]
    )

    token = client.find(:token, params[:token])
    member = token.member
    "Boards: #{member.boards.count}"

    # Trello.configure do |config|
    #   config.developer_public_key = PUBLIC_KEY
    #   config.member_token = params[:token]
    # end

    # puts Trello::Member.find("_larryprice").boards.count
  end

  get '/styles.css' do
    scss :styles
  end
end
{'fraction_non_alphanumeric': 0.11388196176226101, 'fraction_numerical': 0.038237738985868665, 'mean_word_length': 3.5606060606060606, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1096824', 'n_tokens_mistral': 475, 'n_tokens_neox': 429, 'n_words': 102}