Skip to content

Commit

Permalink
Create SearchUsers.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit-world committed Mar 1, 2021
1 parent 2527bfe commit 17ec2b2
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package me.grishka.houseclub.api.methods;

import java.util.List;

import me.grishka.houseclub.api.ClubhouseAPIRequest;
import me.grishka.houseclub.api.model.FullUser;

public class SearchUsers extends ClubhouseAPIRequest<SearchUsers.Resp> {

public SearchUsers(String query) {
super("POST", "search_users", Resp.class);
requestBody = new Body(query);
}

private static class Body {
public boolean cofollowsOnly;
public boolean followingOnly;
public boolean followersOnly;
public String query;

public Body(String query) {
this.query = query;
}
}

public static class Resp {
public List<FullUser> users;
public int count;
}
}

0 comments on commit 17ec2b2

Please sign in to comment.