public List<Release> getReleases(IRepositoryIdProvider repository, int start, int size) throws IOException {
        String id = getId(repository);
        StringBuilder uri = new StringBuilder(IGitHubConstants.SEGMENT_REPOS);
        uri.append('/').append(id);
        uri.append(SEGMENT_RELEASES);
        PagedRequest<Release> request;
        if (start == -1 || size == -1) {
            request = createPagedRequest();
        }
        else {
            request = createPagedRequest(start, size);
        }
        request.setUri(uri);
        request.setType(new TypeToken<List<Release>>() {}.getType());
        return getAll(request);
    }