Project

Profile

Help

Issue #4989

closed

Api bindings for python use unnecessary verbose action names

Added by mdellweg over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

This leads to code like:

repository = repositories.repositories_create(repository_data)
sync_response = fileremotes.remotes_file_file_sync(file_remote.href, repository_sync_data)

It is not only unnecessary to namespace the actions by the used endpoint identifier, but it also prevents to write a generic function that decides whether to call update or create on an endpoint, that is given as a parameter.

I expect the above code to look like:

repository = repositories.create(repository_data)
sync_response = fileremotes.sync(file_remote.href, repository_sync_data)

Also available in: Atom PDF