doctormo / python-gitlab3

Python wrapper for the entire GitLab API
GNU Lesser General Public License v3.0
46 stars 25 forks source link

get single project by id or namespace/name #23

Closed fopina closed 7 years ago

fopina commented 9 years ago

V3 API allows to get a single project by id or _NAMESPACE/PROJECTNAME

Get single project

Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by     the authenticated user. If using namespaced projects call make sure that the     NAMESPACE/PROJECT_NAME is URL-encoded, eg. /api/v3/projects/diaspora%2Fdiaspora (where / is     represented by %2F).

GET /projects/:id
Parameters:

id(required) - The ID or NAMESPACE/PROJECT_NAME of a project

Using gitlab3.project('namespace/projectname') yelds ResourceNotFound as it doesn't encode the '/'

Easily worked around by doing so in the call (gitlab3.project('namespace%2Fprojectname')) but maybe it should be done by the library itself.

doctormo commented 7 years ago

Fixed now. Thanks for the report.