Skip to content

Attributes

Dixon Begay edited this page Jun 22, 2017 · 4 revisions

Some of the common JSON keys are assigned as attributes to the GitLab class. Here is a list of them...

issue_types, object_kind, project_id, ref, project_name, user, commit, object_attributes, build_status, repository, repo_name, repo_homepage

The JSON data that is instantiated with the GitLab class is also an attribute of the class as well. json_data is the attribute name.

Example

def post(self, request, *args, **kwargs):
    json_data = json.loads(request.body.decode('utf-8'))
    GitLab_Obj = GitLab(json_data)
    print(GitLab_Obj.json_data) # <- will print entire JSON object
Clone this wiki locally