All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.twitch4j.helix.domain.CharityCampaignWrapper Maven / Gradle / Ivy

There is a newer version: 1.23.0
Show newest version
package com.github.twitch4j.helix.domain;

import lombok.AccessLevel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;
import java.util.Optional;

@Data
@Setter(AccessLevel.PRIVATE)
@NoArgsConstructor
public class CharityCampaignWrapper {

    /**
     * A list that contains the charity campaign that the broadcaster is currently running.
     * 

* The array is empty if the broadcaster is not running a charity campaign; * the campaign information is no longer available as soon as the campaign ends. */ private List data; /** * @return the currently running charity campaign, in an optional wrapper. */ public Optional getCurrentCampaign() { if (data == null || data.isEmpty()) return Optional.empty(); return Optional.ofNullable(data.get(0)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy