Class: LinearApi::Team
- Inherits:
-
Object
- Object
- LinearApi::Team
- Defined in:
- lib/linear_api/team.rb
Overview
Represents a Linear team
Constant Summary collapse
- GET_QUERY =
<<~GRAPHQL query GetTeam($teamId: String!) { team(id: $teamId) { id name key description } } GRAPHQL
- STATES_QUERY =
<<~GRAPHQL query GetStates($teamId: String!) { team(id: $teamId) { states { nodes { id name type position color } } } } GRAPHQL
- USERS_QUERY =
<<~GRAPHQL query ListUsers($teamId: String!) { team(id: $teamId) { members { nodes { id name email displayName active } } } } GRAPHQL
- ALL_METADATA_QUERY =
Fetch all team metadata in a single query (for CacheSync)
<<~GRAPHQL query FetchAllMetadata($teamId: String!) { team(id: $teamId) { labels { nodes { id name color description } } projects { nodes { id name description state progress } } states { nodes { id name type position color } } members { nodes { id name email displayName active } } } } GRAPHQL
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(data) ⇒ Team
constructor
A new instance of Team.
- #to_h ⇒ Object
Constructor Details
#initialize(data) ⇒ Team
Returns a new instance of Team.
94 95 96 97 98 99 100 |
# File 'lib/linear_api/team.rb', line 94 def initialize(data) @raw = data @id = data['id'] @name = data['name'] @key = data['key'] @description = data['description'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
92 93 94 |
# File 'lib/linear_api/team.rb', line 92 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
92 93 94 |
# File 'lib/linear_api/team.rb', line 92 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
92 93 94 |
# File 'lib/linear_api/team.rb', line 92 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
92 93 94 |
# File 'lib/linear_api/team.rb', line 92 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
92 93 94 |
# File 'lib/linear_api/team.rb', line 92 def raw @raw end |
Instance Method Details
#to_h ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/linear_api/team.rb', line 102 def to_h { id: id, name: name, key: key, description: description } end |