-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Edit Current Application Adds support for https://discord.com/developers/docs/resources/application#edit-current-application * use Possible<Optional<String>> for image data params
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
src/main/java/discord4j/discordjson/json/ApplicationInfoRequest.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,45 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.possible.Possible; | ||
import org.immutables.value.Value; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableApplicationInfoRequest.class) | ||
@JsonDeserialize(as = ImmutableApplicationInfoRequest.class) | ||
public interface ApplicationInfoRequest { | ||
|
||
static ImmutableApplicationInfoRequest.Builder builder() { | ||
return ImmutableApplicationInfoRequest.builder(); | ||
} | ||
|
||
@JsonProperty("custom_install_url") | ||
Possible<String> customInstallUrl(); | ||
|
||
@JsonProperty("description") | ||
Possible<String> description(); | ||
|
||
@JsonProperty("role_connections_verification_url") | ||
Possible<String> roleConnectionsVerificationUrl(); | ||
|
||
@JsonProperty("install_params") | ||
Possible<InstallParamsData> installParams(); | ||
|
||
Possible<Integer> flags(); | ||
|
||
Possible<Optional<String>> icon(); | ||
|
||
@JsonProperty("cover_image") | ||
Possible<Optional<String>> coverImage(); | ||
|
||
@JsonProperty("interactions_endpoint_url") | ||
Possible<String> interactionsEndpointUrl(); | ||
|
||
Possible<List<String>> tags(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/discord4j/discordjson/json/InstallParamsData.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,21 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value; | ||
|
||
import java.util.List; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableInstallParamsData.class) | ||
@JsonDeserialize(as = ImmutableInstallParamsData.class) | ||
public interface InstallParamsData { | ||
|
||
static ImmutableInstallParamsData.Builder builder() { | ||
return ImmutableInstallParamsData.builder(); | ||
} | ||
|
||
List<String> scopes(); | ||
|
||
String permissions(); | ||
} |