diff options
Diffstat (limited to 'gitlab/__init__.py')
-rw-r--r-- | gitlab/__init__.py | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 0109935..70e8ffd 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -703,47 +703,6 @@ class Gitlab(object): raise_error_from_response(r, GitlabUpdateError) return r.json() - def Hook(self, id=None, **kwargs): - """Creates/tests/lists system hook(s) known by the GitLab server. - - If id is None, returns a list of hooks. - - If id is an integer, tests the matching hook. - - If id is a dict, creates a new object using attributes provided. The - object is NOT saved on the server. Use the save() method on the object - to write it on the server. - """ - warnings.warn("`Hook` is deprecated, use `hooks` instead", - DeprecationWarning) - return Hook._get_list_or_object(self, id, **kwargs) - - def Project(self, id=None, **kwargs): - """Creates/gets/lists project(s) known by the GitLab server. - - If id is None, returns a list of projects. - - If id is an integer, returns the matching project (or raises a - GitlabGetError if not found) - - If id is a dict, creates a new object using attributes provided. The - object is NOT saved on the server. Use the save() method on the object - to write it on the server. - """ - warnings.warn("`Project` is deprecated, use `projects` instead", - DeprecationWarning) - return Project._get_list_or_object(self, id, **kwargs) - - def UserProject(self, id=None, **kwargs): - """Creates a project for a user. - - id must be a dict. - """ - warnings.warn("`UserProject` is deprecated, " - "use `user_projects` instead", - DeprecationWarning) - return UserProject._get_list_or_object(self, id, **kwargs) - def _list_projects(self, url, **kwargs): r = self._raw_get(url, **kwargs) raise_error_from_response(r, GitlabListError) @@ -755,86 +714,3 @@ class Gitlab(object): l.append(p) return l - - def search_projects(self, query, **kwargs): - """Searches projects by name. - - Returns a list of matching projects. - """ - warnings.warn("`search_projects()` is deprecated, " - "use `projects.search()` instead", - DeprecationWarning) - return self._list_projects("/projects/search/" + query, **kwargs) - - def all_projects(self, **kwargs): - """Lists all the projects (need admin rights).""" - warnings.warn("`all_projects()` is deprecated, " - "use `projects.all()` instead", - DeprecationWarning) - return self._list_projects("/projects/all", **kwargs) - - def owned_projects(self, **kwargs): - """Lists owned projects.""" - warnings.warn("`owned_projects()` is deprecated, " - "use `projects.owned()` instead", - DeprecationWarning) - return self._list_projects("/projects/owned", **kwargs) - - def Group(self, id=None, **kwargs): - """Creates/gets/lists group(s) known by the GitLab server - - Args: - id: If id is None, returns a list of groups. - id: If id is an integer, - returns the matching group (or raises a GitlabGetError if not - found). - id: If id is a dict, creates a new object using attributes - provided. The object is NOT saved on the server. Use the - save() method on the object to write it on the server. - kwargs: Arbitrary keyword arguments - """ - warnings.warn("`Group` is deprecated, use `groups` instead", - DeprecationWarning) - return Group._get_list_or_object(self, id, **kwargs) - - def Issue(self, id=None, **kwargs): - """Lists issues(s) known by the GitLab server. - - Does not support creation or getting a single issue unlike other - methods in this class yet. - """ - warnings.warn("`Issue` is deprecated, use `issues` instead", - DeprecationWarning) - return Issue._get_list_or_object(self, id, **kwargs) - - def User(self, id=None, **kwargs): - """Creates/gets/lists users(s) known by the GitLab server. - - If id is None, returns a list of users. - - If id is an integer, returns the matching user (or raises a - GitlabGetError if not found) - - If id is a dict, creates a new object using attributes provided. The - object is NOT saved on the server. Use the save() method on the object - to write it on the server. - """ - warnings.warn("`User` is deprecated, use `users` instead", - DeprecationWarning) - return User._get_list_or_object(self, id, **kwargs) - - def Team(self, id=None, **kwargs): - """Creates/gets/lists team(s) known by the GitLab server. - - If id is None, returns a list of teams. - - If id is an integer, returns the matching team (or raises a - GitlabGetError if not found) - - If id is a dict, create a new object using attributes provided. The - object is NOT saved on the server. Use the save() method on the object - to write it on the server. - """ - warnings.warn("`Team` is deprecated, use `teams` instead", - DeprecationWarning) - return Team._get_list_or_object(self, id, **kwargs) |