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

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

The 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.ISteamUser;
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 java.util.Collections;

public class ResolveVanityURL extends SteamMethod {

    public ResolveVanityURL(ISteamUser steamInterface) {
        super(
            steamInterface,
            "ResolveVanityURL",
            Collections.singletonList(
                SteamMethodVersion.create()
                    .method(SteamHTTPMethod.GET)
                    .hosts(SteamHost.PUBLIC, SteamHost.PARTNER)
                    .version(SteamVersion.V_1)
                    .visibility(SteamVisibility.ALL)
                    .add(new KeyOption(true))
                    .add(
                        Option.create()
                            .key("vanityurl")
                            .description("The vanity URL to get a SteamID for.")
                            .optionType(OptionTypes.STRING)
                            .isRequired(true)
                        .build()
                    )
                    .add(
                        Option.create()
                            .key("url_type")
                            .description("The type of vanity URL. 1 (default): Individual profile, 2: Group, 3: Official game group.")
                            .optionType(OptionTypes.UINT_32)
                            .isRequired(false)
                        .build()
                    )
                .build()
            )
        );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy