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

io.sphere.client.Endpoints Maven / Gradle / Ivy

There is a newer version: 0.72.1
Show newest version
package io.sphere.client;

import io.sphere.internal.util.Url;

/** Centralizes construction of backend API urls. */
public class Endpoints {

    /** Sphere OAuth 2.0 token endpoint. */
    public static String tokenEndpoint(String authEndpoint) {
        return Url.combine(authEndpoint, "/oauth/token");
    }

    /** Sphere backend API endpoints for given project. */
    public static ProjectEndpoints forProject(String coreEndpoint, String projectKey) {
        if (projectKey == null)
            throw new NullPointerException("projectKey");
        return new ProjectEndpoints(Url.combine(coreEndpoint, projectKey));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy