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

de.SweetCode.SteamAPI.method.methods.RecordOfflinePlaytime Maven / Gradle / Ivy

There is a newer version: 1.0.4-beta
Show newest version
package de.SweetCode.SteamAPI.method.methods;

import de.SweetCode.SteamAPI.SteamHTTPMethod;
import de.SweetCode.SteamAPI.SteamHost;
import de.SweetCode.SteamAPI.SteamVersion;
import de.SweetCode.SteamAPI.SteamVisibility;
import de.SweetCode.SteamAPI.interfaces.IPlayerService;
import de.SweetCode.SteamAPI.method.SteamMethod;
import de.SweetCode.SteamAPI.method.SteamMethodVersion;
import de.SweetCode.SteamAPI.method.option.Option;
import de.SweetCode.SteamAPI.method.option.OptionTypes;
import de.SweetCode.SteamAPI.method.option.options.KeyOption;
import de.SweetCode.SteamAPI.method.option.options.SteamIDOption;

import java.util.Collections;

public class RecordOfflinePlaytime extends SteamMethod {

    public RecordOfflinePlaytime(IPlayerService steamInterface) {
        super(
            steamInterface,
            "RecordOfflinePlaytime",
            Collections.singletonList(
                SteamMethodVersion.create()
                    .method(SteamHTTPMethod.POST)
                    .hosts(SteamHost.PUBLIC, SteamHost.PARTNER)
                    .version(SteamVersion.V_1)
                    .visibility(SteamVisibility.ALL)
                    .add(new KeyOption(false))
                    .add(new SteamIDOption(true))
                    .add(
                        Option.create()
                            .key("ticket")
                            .optionType(OptionTypes.STRING)
                            .isRequired(true)
                        .build()
                    )
                    .add(
                        Option.create()
                            .key("play_sessions")
                            .optionType(OptionTypes.STRING)
                           .isRequired(true)
                        .build()
                    )
                .build()
            )
        );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy