bunq / sdk_java

Java SDK for bunq API
MIT License
49 stars 23 forks source link

UserContext building without static references. (bunq/sdk_java#93) #99

Closed tubbynl closed 6 years ago

tubbynl commented 6 years ago

for prior art see #98

i'm attempting some minor (non-breaking) changes to enable creation of the UserContext without referencing the static BunqContext

References bunq/sdk_java#93

tubbynl commented 6 years ago

i noticed that the actual user contained in the UserContext is the first User accessible for within the ApiContext. I would expect that the userId contained in the SessionContext would specify the User

tubbynl commented 6 years ago

test fail on com.bunq.sdk.model.generated.endpoint.TabUsageSingleTest > classMethod FAILED com.bunq.sdk.exception.TooManyRequestsException at TabUsageSingleTest.java:30

perhaps the API-key used for testing should be bumped

OGKevin commented 6 years ago

@tubbynl please rebase your commits to follow the following pattern. https://github.com/bunq/sdk_java/blob/7ed15ad7762b88f58de44ca1c83a4b1cdea6ae08/.zappr.yaml#L7

tubbynl commented 6 years ago

the line-length checking at 80 chars does not help on your method naming requests (not possible)

line-length 80 is also pretty short, 120 is normal

tubbynl commented 6 years ago

perhaps sharing .idea/codeStyleSettings.xml helps for (future) contributers

tubbynl commented 6 years ago

remaining @codacy-bot issues will actually reduce code quality

OGKevin commented 6 years ago

@tubbynl how do you mean, can you comment on the flagged/commented issue ?

OGKevin commented 6 years ago

@tubbynl my appologies. I followed google java style guide. That should have been mentioned somewhere. Like i said before it seems that i forgot to configure the bot appropriately for java. But its good that you comment on the issues you think the bot has wrong!

You are correct, the line lenght should be 100 and not 80 as described here: https://google.github.io/styleguide/javaguide.html#s4.4-column-limit

I will reconfigure the bot accordingly. Thanks for the feedback.

tubbynl commented 6 years ago

i'm blindly adding newlines at EOF at your request, some files/classes now have 2 or 3 empty lines at the end of the class

tubbynl commented 6 years ago

fails at com.bunq.sdk.model.generated.endpoint.CardDebitTest > orderNewMaestroCardTest FAILED com.bunq.sdk.exception.PleaseContactBunqException at CardDebitTest.java:80

but that probably also fails on a build on the develop branch as-is

this one is clear of Codacy stuff

OGKevin commented 6 years ago

@tubbynl FYI, develop passes 😉 https://travis-ci.org/bunq/sdk_java/builds/391805227 but I'll have a look for you.

OGKevin commented 6 years ago

@tubbynl be aware i did a small push to your branch be sure to pull, ill do a review cycle now.

OGKevin commented 6 years ago

The 2 failing test are alright. rate limit and a 500 which has nothing to do with the SDK it self. The 429 in the tests should be fixed with the throttle.

OGKevin commented 6 years ago

@patrickdw1991 please 👀

tubbynl commented 6 years ago

see #100 close as-you-wish

OGKevin commented 6 years ago

@patrickdw1991 👁

OGKevin commented 6 years ago

@andrederoos