-
Notifications
You must be signed in to change notification settings - Fork 3
Release v0.4.0 #27
Release v0.4.0 #27
Conversation
- moves some objects from kraken to core module
|
||
public class VideoService extends AbstractHttpService { | ||
public VideoService(GlitchHelix helix) { | ||
super(helix.getClient(), helix.getHttpClient()); | ||
} | ||
|
||
public VideoRequest getVideos(Long... id) { | ||
HttpRequest<Videos> request = get("/videos", Videos.class); |
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.
Define a constant instead of duplicating this literal "/videos" 3 times.
|
||
// TODO | ||
public void createStreamMarker() { | ||
throw new UnsupportedOperationException("Stream Markers is not supported yet"); |
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.
Define a constant instead of duplicating this literal "Stream Markers is not supported yet" 3 times.
} | ||
|
||
@Override | ||
protected HttpResponse<Clips> exchange() { |
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.
Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.
|
||
public class UserService extends AbstractHttpService { | ||
public UserService(GlitchHelix helix) { | ||
super(helix.getClient(), helix.getHttpClient()); | ||
} | ||
|
||
public Flux<User> getUsersById(@Nullable Credential credential, Long... id) { | ||
HttpRequest<UserList> users = get("/users", UserList.class); |
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.
Define a constant instead of duplicating this literal "/users" 3 times.
|
||
if (credential != null) { | ||
if (checkRequiredScope(credential.getScopes(), Scope.USER_READ_EMAIL)) { | ||
users.header("Authorization", "Bearer " + credential.getAccessToken()); |
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.
Define a constant instead of duplicating this literal "Authorization" 5 times.
Code Climate has analyzed commit 21f21a4 and detected 24 issues on this pull request. Here's the issue category breakdown:
Note: there are 6 critical issues. View more on Code Climate. |
No description provided.