-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO: add the corresponding cli command
- Loading branch information
Showing
9 changed files
with
213 additions
and
4 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
...re/src/main/java/com/easemob/im/server/api/metadata/user/get/MetadataGetUsersRequest.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,28 @@ | ||
package com.easemob.im.server.api.metadata.user.get; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.List; | ||
|
||
public class MetadataGetUsersRequest { | ||
@JsonProperty("targets") | ||
private List<String> targets; | ||
|
||
@JsonProperty("properties") | ||
private List<String> properties; | ||
|
||
@JsonCreator | ||
public MetadataGetUsersRequest(@JsonProperty("targets") List<String> targets, | ||
@JsonProperty("properties") List<String> properties) { | ||
this.targets = targets; | ||
this.properties = properties; | ||
} | ||
|
||
@Override public String toString() { | ||
return "MetadataGetUsersRequest{" + | ||
"targets=" + targets + | ||
", properties=" + properties + | ||
'}'; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...e/src/main/java/com/easemob/im/server/api/metadata/user/get/MetadataGetUsersResponse.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,32 @@ | ||
package com.easemob.im.server.api.metadata.user.get; | ||
|
||
import com.easemob.im.server.model.EMBatchMetadata; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Map; | ||
|
||
public class MetadataGetUsersResponse { | ||
@JsonProperty("data") | ||
private Map<String, Map<String, String>> data; | ||
|
||
@JsonCreator | ||
public MetadataGetUsersResponse(@JsonProperty("data") Map<String, Map<String, String>> data) { | ||
this.data = data; | ||
} | ||
|
||
public Map<String, Map<String, String>> getData() { | ||
return data; | ||
} | ||
|
||
public EMBatchMetadata toBatchMetadata() { | ||
return new EMBatchMetadata(this.data); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MetadataGetUserResponse{" + | ||
"data=" + data + | ||
'}'; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
im-sdk-core/src/main/java/com/easemob/im/server/model/EMBatchMetadata.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,22 @@ | ||
package com.easemob.im.server.model; | ||
|
||
import java.util.Map; | ||
|
||
public class EMBatchMetadata { | ||
private Map<String, Map<String, String>> data; | ||
|
||
public EMBatchMetadata(Map<String, Map<String, String>> data) { | ||
this.data = data; | ||
} | ||
|
||
public Map<String, Map<String, String>> getData() { | ||
return data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "EMMetadata{" + | ||
"data=" + data + | ||
'}'; | ||
} | ||
} |
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