Module: Ask::Linear
- Defined in:
- lib/ask/linear/client.rb,
lib/ask/linear/context.rb,
lib/ask/linear/version.rb,
lib/ask/linear/error_guide.rb
Defined Under Namespace
Modules: Errors Classes: Client, ClientProxy
Constant Summary collapse
- DESCRIPTION =
Human-readable description of the Linear service context.
"Linear — issue tracking, project management, roadmaps, sprints"- DOCS_URL =
Base URL for Linear API documentation.
"https://developers.linear.app/docs"- GRAPHQL_URL =
URL for the Linear GraphQL API schema (available via introspection).
"https://api.linear.app/graphql"- AUTH_NAME =
Credential name used with Ask::Auth.resolve.
:linear_api_key- AUTH_HOW =
Instructions for obtaining a Linear personal API key.
"https://linear.app/settings/api — generate a personal API key"- GEM_NAME =
Gem name for the Linear API client.
"faraday"- GEM_VERSION =
Required gem version constraint.
"~> 2.0"- GEM_DOCS =
URL for Faraday Ruby library documentation.
"https://lostisland.github.io/faraday"- QUICK_START =
Quick-start Ruby code snippet for agents to copy-paste.
<<~RUBY client = Ask::Linear.client # List teams result = client.query("query { teams { nodes { id key name } } }") # Get issue by ID result = client.query("query($id: String!) { issue(id: $id) { id identifier title description url } }", { id: "ISSUE_ID" }) # Create issue result = client.query("mutation($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { id identifier title url } } }", { input: { teamId: "TEAM_ID", title: "New issue", description: "Description" } }) # List issues for a team result = client.query("query { team(id: \\"TEAM_ID\\") { issues { nodes { id identifier title state { name } priority } } } }") RUBY
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.client ⇒ Ask::Linear::Client
Returns an authenticated GraphQL client for the Linear API.
Class Method Details
.client ⇒ Ask::Linear::Client
Returns an authenticated GraphQL client for the Linear API.
Resolves the API key via Ask::Auth.resolve(:linear_api_key) and returns a Client that wraps Faraday and sends GraphQL queries to https://api.linear.app/graphql.
Configuration:
-
read_timeout:30seconds -
open_timeout:10seconds
28 29 30 31 |
# File 'lib/ask/linear/client.rb', line 28 def self.client api_key = Ask::Auth.resolve(:linear_api_key) ClientProxy.new(Client.new(api_key)) end |