Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.robrua.orianna.api.dto;
 
 import java.net.URI;
 import java.util.List;
 
 
public abstract class StatusAPI {
    

Parameters:
region the region's shard to get
Returns:
the shard
See also:
Riot API Specification
    public static ShardStatus getShard(final Region region) {
        try {
            final URI uri = new URIBuilder().setScheme("http").setHost("status.leagueoflegends.com").setPath("/shards/" + region.toString().toLowerCase())
                    .build();
            return ..fromJson(BaseRiotAPI.get(uritrue), ShardStatus.class);
        }
        catch(final URISyntaxException e) {
            throw new OriannaException("Generated http request wasn't valid! Report this to the Orianna team.");
        }
    }

    

Returns:
the list of all shards
See also:
Riot API Specification
    public static List<ShardgetShards() {
        try {
            final URI uri = new URIBuilder().setScheme("http").setHost("status.leagueoflegends.com").setPath("/shards").build();
            final Type type = new TypeToken<List<Shard>>() {}.getType();
            return ..fromJson(BaseRiotAPI.get(uritrue), type);
        }
        catch(final URISyntaxException e) {
            throw new OriannaException("Generated http request wasn't valid! Report this to the Orianna team.");
        }
    }
New to GrepCode? Check out our FAQ X