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

Explore the source code of the class GetUpdatesRequest.java


package com.antonioaltieri.telegram.botapi.requests;

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

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

public class GetUpdatesRequest implements ApiRequest> {

    private Map args = new HashMap<>();

    public GetUpdatesRequest() {
    }

    public GetUpdatesRequest(OptionalArgs optionalArgs) {
        if (optionalArgs != null)
            args.putAll(optionalArgs.options());
    }

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

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

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

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

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