summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2013-02-16 09:55:22 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2013-02-16 09:55:22 +0100
commitc10b01e84a9a262c00e46d7a4f315d66bea4fb94 (patch)
tree073d735f98ffdc422552c7df9f74ac30c14d527b /gitlab.py
parenta02180d1fe47ebf823f91ea0caff9064b58d2f5a (diff)
downloadgitlab-c10b01e84a9a262c00e46d7a4f315d66bea4fb94.tar.gz
move documentation and todo to README.md
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/gitlab.py b/gitlab.py
index 2da2b46..b40239c 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -619,32 +619,3 @@ class Project(GitlabObject):
return self._getListOrObject(ProjectTag, id,
project_id=self.id,
**kwargs)
-
-
-if __name__ == '__main__':
- # Quick "doc"
- #
- # See https://github.com/gitlabhq/gitlabhq/tree/master/doc/api for the
- # source
-
- # Register a connection to a gitlab instance, using its URL and a user
- # private token
- gl = Gitlab('http://192.168.123.107:8080', 'JVNSESs8EwWRx5yDxM5q')
- # Connect to get the current user (as gl.user)
- gl.auth()
-
- # get a list of projects
- for p in gl.Project():
- print p.name
- # get associated issues
- issues = p.Issue()
- for issue in issues:
- closed = 0 if not issue.closed else 1
- print " %d => %s (closed: %d)" % (issue.id, issue.title, closed)
- # and close them all
- issue.closed = 1
- issue.save()
-
- # get the first 10 groups (pagination)
- for g in gl.Group(page=1, per_page=10):
- print g