-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support /event/ URLs for real this time
Fixes #59
- Loading branch information
Showing
5 changed files
with
78 additions
and
3 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
24 changes: 24 additions & 0 deletions
24
Houseclub/src/main/java/me/grishka/houseclub/api/methods/GetEvent.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,24 @@ | ||
package me.grishka.houseclub.api.methods; | ||
|
||
import me.grishka.houseclub.api.ClubhouseAPIRequest; | ||
import me.grishka.houseclub.api.model.Event; | ||
|
||
public class GetEvent extends ClubhouseAPIRequest<GetEvent.Response>{ | ||
|
||
public GetEvent(String id){ | ||
super("POST", "get_event", Response.class); | ||
requestBody=new Body(id); | ||
} | ||
|
||
private static class Body{ | ||
public String eventHashid; | ||
|
||
public Body(String eventHashid){ | ||
this.eventHashid=eventHashid; | ||
} | ||
} | ||
|
||
public static class Response{ | ||
public Event event; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Houseclub/src/main/java/me/grishka/houseclub/api/model/Event.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,15 @@ | ||
package me.grishka.houseclub.api.model; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
public class Event{ | ||
public String channel; | ||
public boolean isExpired; | ||
public Date timeStart; | ||
public String description, name; | ||
public int eventId; | ||
public boolean isMemberOnly; | ||
public List<FullUser> hosts; | ||
public boolean clubIsMember, clubIsFollower; | ||
} |
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