Android Open Source - ponyville-live-android Endpoints

From Project

Back to project page ponyville-live-android.


The source code is released under:

Apache License

If you think the Android project ponyville-live-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*  w  ww  .ja va 2  s.  co  m*/

public enum Endpoints {
    PRODUCTION("Production", NetModule.PRODUCTION_API_URL),
    // STAGING("Staging", ""),
    MOCK_MODE("Mock Mode", "mock://"),
    CUSTOM("Custom", null);

    public final String name;
    public final String url;

    Endpoints(String name, String url) { = name;
        this.url = url;

    public static Endpoints from(String endpoint) {
        for (Endpoints value : values()) {
            if (value.url != null && value.url.equals(endpoint)) {
                return value;
        return CUSTOM;

    public static boolean isMockMode(String endpoint) {
        return from(endpoint) == MOCK_MODE;

Java Source Code List