Class: Gitlab::Client

Inherits:
API show all
Includes:
Branches, BuildVariables, Builds, Commits, Groups, Issues, Jobs, Keys, Labels, MergeRequests, Milestones, Namespaces, Notes, PipelineTriggers, Pipelines, Projects, Repositories, RepositoryFiles, Runners, Services, Snippets, SystemHooks, Tags, Users
Defined in:
lib/gitlab/client.rb,
lib/gitlab/client/jobs.rb,
lib/gitlab/client/keys.rb,
lib/gitlab/client/tags.rb,
lib/gitlab/client/notes.rb,
lib/gitlab/client/users.rb,
lib/gitlab/client/builds.rb,
lib/gitlab/client/groups.rb,
lib/gitlab/client/issues.rb,
lib/gitlab/client/labels.rb,
lib/gitlab/client/commits.rb,
lib/gitlab/client/runners.rb,
lib/gitlab/client/branches.rb,
lib/gitlab/client/projects.rb,
lib/gitlab/client/services.rb,
lib/gitlab/client/snippets.rb,
lib/gitlab/client/pipelines.rb,
lib/gitlab/client/milestones.rb,
lib/gitlab/client/namespaces.rb,
lib/gitlab/client/repositories.rb,
lib/gitlab/client/system_hooks.rb,
lib/gitlab/client/merge_requests.rb,
lib/gitlab/client/build_variables.rb,
lib/gitlab/client/repository_files.rb,
lib/gitlab/client/pipeline_triggers.rb

Overview

Wrapper for the Gitlab REST API.

Defined Under Namespace

Modules: Branches, BuildVariables, Builds, Commits, Groups, Issues, Jobs, Keys, Labels, MergeRequests, Milestones, Namespaces, Notes, PipelineTriggers, Pipelines, Projects, Repositories, RepositoryFiles, Runners, Services, Snippets, SystemHooks, Tags, Users

Instance Attribute Summary

Attributes inherited from Request

#endpoint, #private_token

Instance Method Summary collapse

Methods included from Jobs

#job, #job_artifacts, #job_artifacts_download, #job_artifacts_keep, #job_cancel, #job_erase, #job_play, #job_retry, #job_trace, #jobs, #pipeline_jobs

Methods included from Users

#add_email, #block_user, #create_ssh_key, #create_user, #delete_email, #delete_ssh_key, #delete_user, #edit_user, #email, #emails, #session, #ssh_key, #ssh_keys, #unblock_user, #user, #user_search, #users

Methods included from Tags

#create_release, #create_tag, #delete_tag, #tag, #tags, #update_release

Methods included from SystemHooks

#add_hook, #delete_hook, #hook, #hooks

Methods included from Snippets

#create_snippet, #delete_snippet, #edit_snippet, #snippet, #snippet_content, #snippets

Methods included from Services

#change_service, #delete_service, #service

Methods included from Runners

#all_runners, #delete_runner, #project_disable_runner, #project_enable_runner, #project_runners, #runner, #runners, #update_runner

Methods included from RepositoryFiles

#create_file, #edit_file, #file_contents, #get_file, #remove_file

Methods included from Repositories

#compare, #repo_archive, #tree

Methods included from Projects

#add_project_hook, #add_push_rule, #add_team_member, #create_deploy_key, #create_fork, #create_project, #delete_deploy_key, #delete_project, #delete_project_hook, #delete_push_rule, #deploy_key, #deploy_keys, #disable_deploy_key, #edit_project, #edit_project_hook, #edit_push_rule, #edit_team_member, #enable_deploy_key, #make_forked_from, #project, #project_events, #project_hook, #project_hooks, #project_search, #projects, #push_rule, #remove_forked, #remove_team_member, #share_project_with_group, #star_project, #team_member, #team_members, #unstar_project

Methods included from PipelineTriggers

#create_trigger, #remove_trigger, #run_trigger, #trigger, #trigger_take_ownership, #triggers, #update_trigger

Methods included from Pipelines

#cancel_pipeline, #create_pipeline, #pipeline, #pipelines, #retry_pipeline

Methods included from Notes

#create_issue_note, #create_merge_request_note, #create_note, #create_snippet_note, #issue_note, #issue_notes, #merge_request_note, #merge_request_notes, #note, #notes, #snippet_note, #snippet_notes

Methods included from Namespaces

#namespaces

Methods included from Milestones

#create_milestone, #edit_milestone, #milestone, #milestone_issues, #milestone_merge_requests, #milestones

Methods included from MergeRequests

#accept_merge_request, #create_merge_request, #create_merge_request_comment, #delete_merge_request_comment, #edit_merge_request_comment, #merge_request, #merge_request_changes, #merge_request_closes_issues, #merge_request_comments, #merge_request_commits, #merge_requests, #subscribe_to_merge_request, #unsubscribe_from_merge_request, #update_merge_request

Methods included from Labels

#create_label, #delete_label, #edit_label, #labels

Methods included from Keys

#key

Methods included from Issues

#close_issue, #create_issue, #delete_issue, #edit_issue, #issue, #issues, #reopen_issue, #subscribe_to_issue, #unsubscribe_from_issue

Methods included from Groups

#add_group_member, #create_group, #delete_group, #edit_group_member, #group, #group_members, #group_projects, #group_search, #groups, #remove_group_member, #transfer_project_to_group

Methods included from Commits

#commit, #commit_comments, #commit_diff, #commit_status, #commits, #create_commit, #create_commit_comment, #update_commit_status

Methods included from BuildVariables

#create_variable, #remove_variable, #update_variable, #variable, #variables

Methods included from Builds

#build, #build_artifacts, #build_cancel, #build_erase, #build_retry, #builds, #commit_builds

Methods included from Branches

#branch, #branches, #create_branch, #delete_branch, #protect_branch, #unprotect_branch

Methods inherited from API

#initialize

Methods inherited from Request

decode, #delete, #get, parse, #post, #put, #set_request_defaults, #validate

Constructor Details

This class inherits a constructor from Gitlab::API

Instance Method Details

#inspectString

Text representation of the client, masking private token.

Returns:

  • (String)


34
35
36
37
38
39
40
41
42
# File 'lib/gitlab/client.rb', line 34

def inspect
  inspected = super

  if @private_token
    inspected = inspected.sub! @private_token, only_show_last_four_chars(@private_token)
  end

  inspected
end

#url_encode(s) ⇒ Object



44
45
46
# File 'lib/gitlab/client.rb', line 44

def url_encode(s)
  ERB::Util.url_encode(s)
end