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

com.antonioaltieri.telegram.botapi.requests.GetUserProfilePhotosRequest Maven / Gradle / Ivy

package com.antonioaltieri.telegram.botapi.requests;

import com.antonioaltieri.telegram.botapi.types.UserProfilePhotos;

import java.util.HashMap;
import java.util.Map;

public class GetUserProfilePhotosRequest implements ApiRequest {

    private Map args = new HashMap<>();

    public GetUserProfilePhotosRequest(long userId) {
        this(userId, null);
    }

    public GetUserProfilePhotosRequest(long userId, OptionalArgs optionalArgs) {
        args.put("user_id", String.valueOf(userId));

        if (optionalArgs != null)
            args.putAll(optionalArgs.options());
    }

    @Override
    public String getMethodName() {
        return "getUserProfilePhotos";
    }

    @Override
    public ResultTypes getResultType() {
        return ResultTypes.USER_PROFILE_PHOTOS;
    }

    @Override
    public Map getArgs() {
        return args;
    }

    @Override
    public RequestStrategy getRequestStrategy() {
        return new PostStrategy();
    }

    @Override
    public String toString() {
        return "GetUserProfilePhotosRequest{" +
                "args=" + args +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy