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

com.notronix.etsy.impl.authentication.method.PingMethod Maven / Gradle / Ivy

There is a newer version: 3.0.0014
Show newest version
package com.notronix.etsy.impl.authentication.method;

import com.google.gson.reflect.TypeToken;
import com.notronix.etsy.api.authentication.model.Credentials;
import com.notronix.etsy.api.Unmarshaller;
import com.notronix.etsy.impl.EtsyMethod;

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

public class PingMethod extends EtsyMethod
{
    public PingMethod(Credentials clientCredentials) {
        super(clientCredentials, null);
    }
    @Override
    public Long getResponse(Unmarshaller unmarshaller, String payload) {
        Map result = unmarshaller.unmarshal(payload,
                new TypeToken>(){}.getType());

        return result.get("application_id");
    }

    @Override
    protected String getURI() {
        return "/application/openapi-ping";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy