Module: Tickrb

Extended by:
T::Sig
Defined in:
lib/tickrb/version.rb,
lib/tickrb.rb,
lib/tickrb/auth.rb,
lib/tickrb/client.rb,
lib/tickrb/mcp_server.rb,
lib/tickrb/token_store.rb

Overview

typed: strict frozen_string_literal: true

Defined Under Namespace

Classes: Auth, Client, Error, McpServer, TokenStore

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.auth(options = {}) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/tickrb.rb', line 25

def auth(options = {})
  existing_token = TokenStore.load_token

  unless existing_token
    Auth.run(
      client_id: options[:client_id],
      client_secret: options[:client_secret],
      redirect_uri: options[:redirect_uri]
    )
  end
end

.mcp_server(options = {}) ⇒ Object



19
20
21
22
23
# File 'lib/tickrb.rb', line 19

def mcp_server(options = {})
  auth(options)

  McpServer.start
end