-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
389 additions
and
309 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.../loom/client/http/LoomBinaryResponse.java → ...oom/client/common/LoomBinaryResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
common/src/main/java/io/metaloom/loom/client/common/LoomClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.metaloom.loom.client.common; | ||
|
||
import io.metaloom.loom.client.common.method.ClientMethods; | ||
|
||
public interface LoomClient extends ClientMethods, CommonSettings, AutoCloseable { | ||
|
||
/** | ||
* Set the token to be used for authentication. | ||
* | ||
* @param token | ||
*/ | ||
void setToken(String token); | ||
|
||
/** | ||
* Close the client and release all resources. | ||
*/ | ||
void close(); | ||
} |
26 changes: 26 additions & 0 deletions
26
common/src/main/java/io/metaloom/loom/client/common/LoomClientException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.metaloom.loom.client.common; | ||
|
||
public class LoomClientException extends Exception { | ||
|
||
private static final long serialVersionUID = 6434236577973357902L; | ||
private int code; | ||
|
||
public LoomClientException(int code, String msg) { | ||
super(msg); | ||
this.code = code; | ||
} | ||
|
||
public LoomClientException(int code, String msg, Exception e) { | ||
super(msg, e); | ||
this.code = code; | ||
} | ||
|
||
public int getStatusCode() { | ||
return code; | ||
} | ||
|
||
public String getStatusMsg() { | ||
return getMessage(); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
common/src/main/java/io/metaloom/loom/client/common/LoomClientRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.metaloom.loom.client.common; | ||
|
||
import io.metaloom.loom.rest.model.RestResponseModel; | ||
import io.reactivex.rxjava3.core.Single; | ||
|
||
public interface LoomClientRequest<T extends RestResponseModel<T>> extends QueryParameters<T> { | ||
|
||
Single<T> async(); | ||
|
||
T sync() throws LoomClientException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...client/http/method/AnnotationMethods.java → ...ient/common/method/AnnotationMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ent/http/method/AssetLocationMethods.java → ...t/common/method/AssetLocationMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...loom/client/http/method/AssetMethods.java → ...om/client/common/method/AssetMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...client/http/method/AttachmentMethods.java → ...ient/common/method/AttachmentMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...nt/http/method/AuthenticationMethods.java → .../common/method/AuthenticationMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
common/src/main/java/io/metaloom/loom/client/common/method/ClientMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.metaloom.loom.client.common.method; | ||
|
||
public interface ClientMethods extends | ||
UserMethods, | ||
AssetMethods, | ||
AssetLocationMethods, | ||
AttachmentMethods, | ||
ClusterMethods, | ||
GroupMethods, | ||
RoleMethods, | ||
CollectionMethods, | ||
AnnotationMethods, | ||
TaskMethods, | ||
TagMethods, | ||
AuthenticationMethods, | ||
ReactionMethods, | ||
TokenMethods, | ||
LibraryMethods, | ||
ProjectMethods, | ||
CommentMethods, | ||
EmbeddingMethods { | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
...om/client/http/method/ClusterMethods.java → .../client/common/method/ClusterMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...client/http/method/CollectionMethods.java → ...ient/common/method/CollectionMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...om/client/http/method/CommentMethods.java → .../client/common/method/CommentMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../client/http/method/EmbeddingMethods.java → ...lient/common/method/EmbeddingMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...loom/client/http/method/GroupMethods.java → ...om/client/common/method/GroupMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...om/client/http/method/LibraryMethods.java → .../client/common/method/LibraryMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...om/client/http/method/ProjectMethods.java → .../client/common/method/ProjectMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...m/client/http/method/ReactionMethods.java → ...client/common/method/ReactionMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../loom/client/http/method/RoleMethods.java → ...oom/client/common/method/RoleMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...m/loom/client/http/method/TagMethods.java → ...loom/client/common/method/TagMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../loom/client/http/method/TaskMethods.java → ...oom/client/common/method/TaskMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...loom/client/http/method/TokenMethods.java → ...om/client/common/method/TokenMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../loom/client/http/method/UserMethods.java → ...oom/client/common/method/UserMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.