Package gitlab3 :: Class GitLab
[hide private]
[frames] | no frames]

Class GitLab

A GitLab API connection.

Nested Classes [hide private]
  CurrentUser
The currently authenticated user.
  Issue
An issue.
  Group
A project group.
  SystemHook
A system hook.
  Project
A project.
  User
A GitLab user.
  Team
A team of users.
Instance Methods [hide private]
 
current_user(id)
Return the CurrentUser specified by the given id.
 
issues(limit=None, page=None, per_page=None)
Return a list of GitLab issues.
 
find_issue(find_all=False, cached=None, **kwargs)
Find the first matching Issue whose properties match all of the key, value pairs given in the arguments.
 
groups(limit=None, page=None, per_page=None)
Return a list of GitLab groups.
 
find_group(find_all=False, cached=None, **kwargs)
Find the first matching Group whose properties match all of the key, value pairs given in the arguments.
 
group(id)
Return the Group specified by the given id.
 
add_group(name, path)
Add a new group to GitLab
 
delete_group(group)
Equivalent to group.delete()
 
system_hooks(limit=None, page=None, per_page=None)
Return a list of GitLab system_hooks.
 
find_system_hook(find_all=False, cached=None, **kwargs)
Find the first matching SystemHook whose properties match all of the key, value pairs given in the arguments.
 
add_system_hook(url)
Add a new system_hook to GitLab
 
delete_system_hook(system_hook)
Equivalent to system_hook.delete()
 
projects(limit=None, page=None, per_page=None)
Return a list of GitLab projects.
 
find_project(find_all=False, cached=None, **kwargs)
Find the first matching Project whose properties match all of the key, value pairs given in the arguments.
 
project(id)
Return the Project specified by the given id.
 
add_project(name, description=None, default_branch=None, issues_enabled=None, wall_enabled=None, merge_requests_enabled=None, wiki_enabled=None, snippets_enabled=None, public=None)
Add a new project to GitLab
 
delete_project(project)
Equivalent to project.delete()
 
users(limit=None, page=None, per_page=None)
Return a list of GitLab users.
 
find_user(find_all=False, cached=None, **kwargs)
Find the first matching User whose properties match all of the key, value pairs given in the arguments.
 
user(id)
Return the User specified by the given id.
 
add_user(email, password, username, name, skype=None, linkedin=None, twitter=None, projects_limit=None, extern_uid=None, provider=None, bio=None, admin=None, can_create_group=None)
Add a new user to GitLab
 
update_user(user)
Equivalent to user.save()
 
delete_user(user)
Equivalent to user.delete()
 
teams(limit=None, page=None, per_page=None)
Return a list of GitLab teams.
 
find_team(find_all=False, cached=None, **kwargs)
Find the first matching Team whose properties match all of the key, value pairs given in the arguments.
 
team(id)
Return the Team specified by the given id.
 
add_team(name, path)
Add a new team to GitLab
 
add_project_for_user(user_id, name, description=None, default_branch=None, issues_enabled=None, wall_enabled=None, merge_requests_enabled=None, wiki_enabled=None, snippets_enabled=None, public=None)
Add a project owned by the given user.
 
find_projects_by_name(query, per_page=None, page=None)
Use GitLab's API for finding projects by name (more efficient than find_project(name='<name>')).
 
__init__(self, gitlab_url, token=None, convert_dates=True, ssl_verify=None, ssl_cert=None)
Initialize a GitLab connection and optionally supply auth token.
 
login(self, login_or_email, password)
Log in to GitLab.
Method Details [hide private]

current_user(id)

 

Return the CurrentUser specified by the given id. get_current_user() may be used as an alias for this function.

issues(limit=None, page=None, per_page=None)

 

Return a list of GitLab issues.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_issue(find_all=False, cached=None, **kwargs)

 

Find the first matching Issue whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching issues will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

groups(limit=None, page=None, per_page=None)

 

Return a list of GitLab groups.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_group(find_all=False, cached=None, **kwargs)

 

Find the first matching Group whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching groups will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

group(id)

 

Return the Group specified by the given id. get_group() may be used as an alias for this function.

add_group(name, path)

 

Add a new group to GitLab

On success, the newly created object is returned.

system_hooks(limit=None, page=None, per_page=None)

 

Return a list of GitLab system_hooks.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_system_hook(find_all=False, cached=None, **kwargs)

 

Find the first matching SystemHook whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching system_hooks will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

add_system_hook(url)

 

Add a new system_hook to GitLab

On success, the newly created object is returned.

projects(limit=None, page=None, per_page=None)

 

Return a list of GitLab projects.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_project(find_all=False, cached=None, **kwargs)

 

Find the first matching Project whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching projects will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

project(id)

 

Return the Project specified by the given id. get_project() may be used as an alias for this function.

add_project(name, description=None, default_branch=None, issues_enabled=None, wall_enabled=None, merge_requests_enabled=None, wiki_enabled=None, snippets_enabled=None, public=None)

 

Add a new project to GitLab

On success, the newly created object is returned.

users(limit=None, page=None, per_page=None)

 

Return a list of GitLab users.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_user(find_all=False, cached=None, **kwargs)

 

Find the first matching User whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching users will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

user(id)

 

Return the User specified by the given id. get_user() may be used as an alias for this function.

add_user(email, password, username, name, skype=None, linkedin=None, twitter=None, projects_limit=None, extern_uid=None, provider=None, bio=None, admin=None, can_create_group=None)

 

Add a new user to GitLab

On success, the newly created object is returned.

teams(limit=None, page=None, per_page=None)

 

Return a list of GitLab teams.

limit can be given to specify the maximum list size.

page and per_page can be used for pagination.

limit should not be specified with either page or per_page. If it is, limit takes precedence.

find_team(find_all=False, cached=None, **kwargs)

 

Find the first matching Team whose properties match all of the key, value pairs given in the arguments.

If find_all is true, a list of all matching teams will be returned. If a cached list is not given, the list to search will be queried from the server each time this is called.

Searching is done via an unoptimized, inefficient o(n) search.

All arguments must be named.

team(id)

 

Return the Team specified by the given id. get_team() may be used as an alias for this function.

add_team(name, path)

 

Add a new team to GitLab

On success, the newly created object is returned.

__init__(self, gitlab_url, token=None, convert_dates=True, ssl_verify=None, ssl_cert=None)
(Constructor)

 

Initialize a GitLab connection and optionally supply auth token. convert_dates can be set to False to disable automatic conversion of date strings to datetime objects. ssl_verify and ssl_cert are passed to python-requests as the verify and cert arguments, respectively.

login(self, login_or_email, password)

 

Log in to GitLab. This is unnecessary if a token was given when creating this GitLab object.