Skip to content

Commit

Permalink
Fix list uri and single uri (#2)
Browse files Browse the repository at this point in the history
* Fix headers and method (#2)

* Add missing headers for put and patch
* Fix incorrect method for post_tab
* Refactor code to always add content type header when there is something to post
* Fix linter issues
* Update python versions for matrix workflow
* Update packages to latest versions

* Remove duplicate list_uri

* Fix inverted list_uri and single_uri

* Add missing single_uri
  • Loading branch information
deperonnier authored Nov 14, 2024
1 parent b8a83c2 commit 82fb0f2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion boondmanager/api/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class Actions(DefaultEndpointMixin, BaseClient):
list_uri = '/actions'
single_uri = '/actions/{}'
tabs = ['rights', 'attached-flags']
list_uri = '/actions'


class ActionsTemplates(BaseClient):
Expand Down
4 changes: 2 additions & 2 deletions boondmanager/api/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class Flags(BaseClient):
>>> flags_client.delete(5)
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/flags'
list_uri = '/flags/{}'
single_uri = '/flags/{}'
list_uri = '/flags'
4 changes: 2 additions & 2 deletions boondmanager/api/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Forms(BaseClient):
"""
allowed_methods = ['GET', 'PUT', 'POST', 'DELETE']
list_uri = '/forms'
list_uri = '/forms/{}'
single_uri = '/forms/{}'
tabs = ['remind', 'rights', 'tasks']


Expand All @@ -62,4 +62,4 @@ class FormsTemplates(BaseClient):
"""
allowed_methods = ['GET', 'PUT', 'POST', 'DELETE']
list_uri = '/forms/templates'
list_uri = '/forms/templates/{}'
single_uri = '/forms/templates/{}'
4 changes: 2 additions & 2 deletions boondmanager/api/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ class Invoices(DefaultEndpointMixin, BaseClient):
>>> invoices_client.get_default()
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/invoices'
list_uri = '/invoices/{}'
list_uri = '/invoices'
single_uri = '/invoices/{}'
tabs = ['rights', 'information', 'attached-flags', 'actions', 'download', 'send', 'tasks']
4 changes: 2 additions & 2 deletions boondmanager/api/poles.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class Poles(BaseClient):
>>> poles_client.delete(5)
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/poles'
list_uri = '/poles/{}'
list_uri = '/poles'
single_uri = '/poles/{}'
4 changes: 2 additions & 2 deletions boondmanager/api/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class Products(DefaultEndpointMixin, BaseClient):
>>> products_client.get_default()
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/products'
list_uri = '/products/{}'
list_uri = '/products'
single_uri = '/products/{}'
tabs = ['rights', 'information', 'attached-flags', 'opportunities', 'projects', 'tasks']
4 changes: 2 additions & 2 deletions boondmanager/api/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Projects(BaseClient):
>>> projects_client.delete(5)
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/projects'
list_uri = '/projects/{}'
list_uri = '/projects'
single_uri = '/projects/{}'
tabs = ['rights', 'information', 'attached-flags', 'batches-markers', 'actions', 'simulation',
'deliveries-groupments', 'advantages', 'purchases', 'productivity', 'orders', 'tasks']
4 changes: 2 additions & 2 deletions boondmanager/api/savedsearches.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class SavedSearches(BaseClient):
>>> saved_searches_client.delete(5)
"""
allowed_methods = ['GET', 'POST', 'DELETE', 'PUT']
single_uri = '/savedsearches'
list_uri = '/savedsearches/{}'
list_uri = '/savedsearches'
single_uri = '/savedsearches/{}'

0 comments on commit 82fb0f2

Please sign in to comment.