From d415cc0929aed8bf95cbbb54f64d457e42d77696 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Wed, 1 Nov 2017 15:27:27 +0100 Subject: Update the repository_blob documentation Fixes #312 --- docs/gl_objects/projects.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/gl_objects/projects.py') diff --git a/docs/gl_objects/projects.py b/docs/gl_objects/projects.py index 6cdd260..4a6f3ad 100644 --- a/docs/gl_objects/projects.py +++ b/docs/gl_objects/projects.py @@ -142,7 +142,10 @@ items = project.repository_tree(path='docs', ref='branch1') # end repository tree # repository blob -file_content = p.repository_blob('master', 'README.rst') +items = project.repository_tree(path='docs', ref='branch1') +file_info = p.repository_blob(items[0]['id']) +content = base64.b64decode(file_info['content']) +size = file_info['size'] # end repository blob # repository raw_blob -- cgit v1.2.1