com.notronix.etsy.impl.authentication.method.PingMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JEtsy Show documentation
Show all versions of JEtsy Show documentation
A Java implementation of a Java version of the Etsy API
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