-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementing /contributions/count endpoint #121
Conversation
4022a0a
to
8b09173
Compare
...heigit/ohsome/ohsomeapi/controller/dataextraction/contributions/ContributionsController.java
Outdated
Show resolved
Hide resolved
5a6a3e1
to
0aeef82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that we should avoid boilerplate code, but let some classes of the contributions endpoints be used by classes of the users endpoints could be misleading. Here some points:
- The UsersController.java uses the ContributionsExecutor.java
- The ContributionsResult.java is called by classes of users endpoints like the UsersRequestExecutor.java
- The method "count" in the class ContributionsExecutor is now used for users/count
- The method writeCsvResponse in AggregateRequestExecutor.java uses ContributionsResults.java even if this class is supposed to be used only for /elements and /elements/_/groupBy/boundary endpoints.
Refactoring some classes and let them "extend" other in-between classes could be a solution.
//edit: adding a get test would be probably fine.
This is because the
Same reason as described above.
Again same reason.
This is indeed not so nice code-quality wise. But this behavior did not get introduced with this branch. It was already before using the
I don't understand what you mean with these two points. A test for what exactly? |
We have this method also in ExecutionUtils.java. Yes, this could be a solution. Could you please change the javadoc upon AggregateRequestExecutor adding that it is used also for the contributions endpoints?
Like you already said with the class GenericRequestExecutor, I meant to create some superclasses and interfaces where needed in order to achieve more inheritance and structure. |
@bonaparten I've updated the javadoc.
It does not matter what type of HTTP request is used in the tests, as the content of GET and POST is processed equally within the code. This was different in earlier versions of the code, but now there is no difference in the processing. |
7cb42ad
to
3886873
Compare
14d36fe
to
5856e15
Compare
61fa070
to
89867d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this new endpoint still supports the old types/keys/values syntax. I'd rather not have deprecated functionality included with new endpoints. Same as already discussed in #34 (review)
types, keys, values are not part of the set of permitted parameters for any /contributions endpoint
since the current version does not yet support these requests ;)
1dd6d06
to
5a1793a
Compare
Description
Implementation of new endpoint /contributions/count
Corresponding issue
#115
New or changed dependencies
Checklist
I have adjusted the examples in the check-ohsome-api script or created an issue in the corresponding repository. More Information here.