ArenaService.WebMapSerivce.java Source code

Java tutorial

Introduction

Here is the source code for ArenaService.WebMapSerivce.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ArenaService;

import org.springframework.web.client.RestTemplate;

/**
 *
 * @author wouteradriaens
 */
public class WebMapSerivce {

    private Arenas arenas;

    public WebMapSerivce() {
    }

    public WebMapSerivce(Arenas arenas) {
        this.setArenas(arenas);
    }

    public Arenas consumeMapInfo() {
        RestTemplate restTemplate = new RestTemplate();
        Arenas response = restTemplate.getForObject(
                "https://api.worldoftanks.eu/wot/encyclopedia/arenas/?application_id=102bb26eb57f82e3b28572f345fef266",
                Arenas.class);
        return response;
    }

    public Arenas getArenas() {
        return arenas;
    }

    private void setArenas(Arenas arenas) {
        this.arenas = arenas;
    }

}