Class: BundleUp::Unify::Client
- Inherits:
-
Object
- Object
- BundleUp::Unify::Client
- Defined in:
- lib/bundleup/unify.rb,
sig/bundleup/unify.rbs
Overview
Client for Unify API endpoints.
Instance Attribute Summary collapse
-
#api_key ⇒ String
readonly
Returns the value of attribute api_key.
-
#connection_id ⇒ String
readonly
Returns the value of attribute connection_id.
Instance Method Summary collapse
-
#calendar ⇒ Calendar
Access the Calendar API for the connection.
-
#chat ⇒ Chat
Access the Chat API for the connection.
-
#crm ⇒ CRM
Access the CRM API for the connection.
-
#drive ⇒ Drive
Access the Drive API for the connection.
-
#git ⇒ Git
Access the Git API for the connection.
-
#initialize(api_key, connection_id) ⇒ Client
constructor
A new instance of Client.
-
#mcp ⇒ Object
Access the Unified MCP server for the connection.
-
#me(params = {}) ⇒ { data: Me::account }
Fetch the account this connection is authenticated as.
- #pm ⇒ PM
-
#ticketing ⇒ Object
Access the Ticketing API for the connection.
Constructor Details
#initialize(api_key, connection_id) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bundleup/unify.rb', line 9 def initialize(api_key, connection_id) @ticketing = BundleUp::Unify::Ticketing.new(api_key, connection_id) @chat = BundleUp::Unify::Chat.new(api_key, connection_id) @git = BundleUp::Unify::Git.new(api_key, connection_id) @crm = BundleUp::Unify::CRM.new(api_key, connection_id) @drive = BundleUp::Unify::Drive.new(api_key, connection_id) @calendar = BundleUp::Unify::Calendar.new(api_key, connection_id) @api_key = api_key @connection_id = connection_id end |
Instance Attribute Details
#api_key ⇒ String (readonly)
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/bundleup/unify.rb', line 7 def api_key @api_key end |
#connection_id ⇒ String (readonly)
Returns the value of attribute connection_id.
7 8 9 |
# File 'lib/bundleup/unify.rb', line 7 def connection_id @connection_id end |
Instance Method Details
#calendar ⇒ Calendar
Access the Calendar API for the connection.
46 47 48 |
# File 'lib/bundleup/unify.rb', line 46 def calendar @calendar ||= BundleUp::Unify::Calendar.new(api_key, connection_id) end |
#chat ⇒ Chat
Access the Chat API for the connection.
21 22 23 |
# File 'lib/bundleup/unify.rb', line 21 def chat @chat ||= BundleUp::Unify::Chat.new(api_key, connection_id) end |
#crm ⇒ CRM
Access the CRM API for the connection.
31 32 33 |
# File 'lib/bundleup/unify.rb', line 31 def crm @crm ||= BundleUp::Unify::CRM.new(api_key, connection_id) end |
#drive ⇒ Drive
Access the Drive API for the connection.
41 42 43 |
# File 'lib/bundleup/unify.rb', line 41 def drive @drive ||= BundleUp::Unify::Drive.new(api_key, connection_id) end |
#git ⇒ Git
Access the Git API for the connection.
26 27 28 |
# File 'lib/bundleup/unify.rb', line 26 def git @git ||= BundleUp::Unify::Git.new(api_key, connection_id) end |
#mcp ⇒ Object
Access the Unified MCP server for the connection.
59 60 61 |
# File 'lib/bundleup/unify.rb', line 59 def mcp @mcp ||= BundleUp::Unify::MCP.new(api_key, connection_id) end |
#me(params = {}) ⇒ { data: Me::account }
Fetch the account this connection is authenticated as.
me is the one unified method every provider implements, so it hangs off
the Unify client directly instead of a vertical namespace.
54 55 56 |
# File 'lib/bundleup/unify.rb', line 54 def me(params = {}) (@me ||= BundleUp::Unify::Me.new(api_key, connection_id)).get(params) end |
#pm ⇒ PM
11 |
# File 'sig/bundleup/unify.rbs', line 11
def pm: () -> PM
|