Commit 81dfbe88 authored by Henrik Skov Midtiby's avatar Henrik Skov Midtiby

Small fixes.

parent 71d13a77
......@@ -36,9 +36,9 @@ class GitlabClassHelper:
url = self.path + '/groups?name=%s&path=%s&parent_id=%d&visibility=private' % (group_name, group_path, id_of_parent_group)
resp = requests.post(url, headers=self.headers)
if resp.ok:
idx = resp.json()['id']
idx = resp.json()[0]['id']
self.group_id = idx
web_url = resp.json()['web_url']
web_url = resp.json()[0]['web_url']
print('Created the "%s" group in gitlab.' % group_name)
print('web_url to the group: %s' % web_url)
print('Id of the group: %d' % idx)
......
......@@ -13,7 +13,7 @@ Python 3.x.x ...
>>> import config
>>> import pandas as pd
>>> from gitlab_class_helper import GitlabClassHelper
>>> class_helper = GitlabClassHelper("source.coderefinery.org", config.public_access_token)
>>> class_helper = GitlabClassHelper("http://source.coderefinery.org/api/v4", config.public_access_token)
Initialized connection to gitlab instance.
Personal access token works.
>>> class_helper.create_class(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment