Class: SupportOps::GitLab::Namespaces
- Defined in:
- lib/support_ops_gitlab/gitlab/namespaces.rb
Overview
List all namespaces => docs.gitlab.com/api/namespaces/#list-all-namespaces
Defines the class Namespaces within the module SupportOps::GitLab.
Instance Attribute Summary collapse
-
#avatar_url ⇒ String
The URL to the avatar of a namespace.
-
#billable_members_count ⇒ Integer
The billable user count of a namespace.
-
#end_date ⇒ String
The current value of end_date.
-
#full_path ⇒ String
The full path of the namespace.
-
#id ⇒ Integer
The ID of the namespace.
-
#kind ⇒ String
The type of namespace, can be group or user.
-
#max_seats_used ⇒ Integer
The historical max seats used over the last year.
-
#members_count_with_descendants ⇒ Integer
The count of members include descendents for the namespace.
-
#name ⇒ String
The name of the namespace.
-
#parent_id ⇒ Integer
The parent group ID for creating nested namespace.
-
#path ⇒ String
The path of the namespace.
-
#plan ⇒ String
The subscription plan currently in use for the namespace.
-
#projects_count ⇒ Integer
Number of projects in the namespace.
-
#root_repository_size ⇒ Integer
The current value of root_repository_size.
-
#seats_in_use ⇒ Integer
The billable seats in use.
-
#trial ⇒ Boolean
If the namespace is using a trial.
-
#trial_ends_on ⇒ String
Timestamp the trial ends on.
-
#web_url ⇒ String
The URL of the namespace.
Class Method Summary collapse
-
.exists?(path) ⇒ Boolean
Verifies if a specified namespace already exists.
-
.get(object) ⇒ Object
Locates a specific namespace in the GitLab system.
-
.get!(object) ⇒ Object
Locates a specific namespace in the GitLab system.
Methods inherited from Base
#activate!, #approve!, attributes, #badges, #ban!, #block!, client, #client=, #commits, configure, #contributors, #create_support_pin!, #deactivate!, define_attributes, #delete!, #diffs, #disable_2fa!, #discussions, #emails, #encoded_path, #events, #find, #find!, #gpg_keys, #hard_delete!, #impersonations, #initialize, #issues, #jobs, #latest_pipeline, #members, #memberships, #merge_requests, #move!, #notes, #paid?, #pats, #pipeline_variables, #pipelines, #preferences, #projects, readonly_attributes, #reject!, #revoke!, #rotate!, #save!, #ssh_keys, #status, #store_original_attributes, #subscribe!, #support_pin, to_hash, #tokens, #unban!, #unblock!, #unsubscribe!, #webhooks
Constructor Details
This class inherits a constructor from SupportOps::GitLab::Base
Instance Attribute Details
#avatar_url ⇒ String
The URL to the avatar of a namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def avatar_url @avatar_url end |
#billable_members_count ⇒ Integer
The billable user count of a namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def billable_members_count @billable_members_count end |
#end_date ⇒ String
Returns the current value of end_date.
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def end_date @end_date end |
#full_path ⇒ String
The full path of the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def full_path @full_path end |
#id ⇒ Integer
The ID of the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def id @id end |
#kind ⇒ String
The type of namespace, can be group or user
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def kind @kind end |
#max_seats_used ⇒ Integer
The historical max seats used over the last year
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def max_seats_used @max_seats_used end |
#members_count_with_descendants ⇒ Integer
The count of members include descendents for the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def members_count_with_descendants @members_count_with_descendants end |
#name ⇒ String
The name of the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def name @name end |
#parent_id ⇒ Integer
The parent group ID for creating nested namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def parent_id @parent_id end |
#path ⇒ String
The path of the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def path @path end |
#plan ⇒ String
The subscription plan currently in use for the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def plan @plan end |
#projects_count ⇒ Integer
Number of projects in the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def projects_count @projects_count end |
#root_repository_size ⇒ Integer
Returns the current value of root_repository_size.
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def root_repository_size @root_repository_size end |
#seats_in_use ⇒ Integer
The billable seats in use
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def seats_in_use @seats_in_use end |
#trial ⇒ Boolean
If the namespace is using a trial
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def trial @trial end |
#trial_ends_on ⇒ String
Timestamp the trial ends on
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def trial_ends_on @trial_ends_on end |
#web_url ⇒ String
The URL of the namespace
31 32 33 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 31 def web_url @web_url end |
Class Method Details
.exists?(path) ⇒ Boolean
Verifies if a specified namespace already exists
160 161 162 163 164 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 160 def self.exists?(path) response = client.connection.get("namespaces/#{ERB::Util.url_encode(path)}/exists") body = Oj.load(response.body) body['exists'] end |
.get(object) ⇒ Object
Locates a specific namespace in the GitLab system
92 93 94 95 96 97 98 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 92 def self.get(object) if object.is_a? Namespaces Namespaces.new(id: id).find else Namespaces.new(id: object).find end end |
.get!(object) ⇒ Object
Locates a specific namespace in the GitLab system
131 132 133 134 135 136 137 |
# File 'lib/support_ops_gitlab/gitlab/namespaces.rb', line 131 def self.get!(object) if object.is_a? Namespaces Namespaces.new(id: id).find! else Namespaces.new(id: object).find! end end |