applications – How to get blogspost post Label by api in Android Studio?

I have 5 classes in ondroid studio that work well, but when I try to change TO GET POSTAL TO THE LABELS using this example
https://stackoverflow.com/questions/54248434/how-to-get-blog-posts-by-label-in-blogger-api I got an error, but my GOOGLE API CLAVE works fine.

Constants.Java




package com.manupearls.unity.ui.helpers;

Constants of public class {
public static string BLOGGER_KEY = "";
public static string BLOGGER_ID = "2331406457493300588";
public static String LABELS = "firmware";
public static String BASE_URL = "https://www.googleapis.com/blogger/v3/blogs/"+BLOGGER_ID+"/";
} 

RestAdapter.Java




package com.manupearls.unity.data.network;

import android.util.Log;

import com.manupearls.unity.data.models.Manupost;
import com.manupearls.unity.ui.helpers.Constants;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Url;



Public class RestAdapter {

Retrofit static Retrofit;
OkHttpClient static okHttpClient;

Static public web service createAPI () {
OkHttpClient.Builder builder = new OkHttpClient.Builder ();
builder.connectTimeout (5, TimeUnit.SECONDS);
builder.writeTimeout (10, TimeUnit.SECONDS);
builder.readTimeout (30, TimeUnit.SECONDS);
builder.cache (null);
okHttpClient = builder.build ();

retrofit = new Retrofit.Builder ()
.baseUrl (Constants.BASE_URL)
.addConverterFactory (GsonConverterFactory.create ())
.client (okHttpClient)
.build();

return retrofit.create (Webservice.class);
}

static public cancellation () {
okHttpClient.dispatcher (). cancelAll ();
}

Public static retrofit getRetrofit () {
change return
}
} 

MockRestAdapter.java




package com.manupearls.unity.data.network;

import com.manupearls.unity.ui.helpers.Constants;

import retrofit2.Retrofit;
import retrofit2.mock.BehaviorDelegate;
import retrofit2.mock.MockRetrofit;
import retrofit2.mock.NetworkBehavior;

public class MockRestAdapter {
public web service build () {
// Create a very simple adaptation adapter that points to the GitHub API.
Retrofit retrofit = new Retrofit.Builder ()
.baseUrl (Constants.BASE_URL)
.build();

// Create a MockRetrofit object with a NetworkBehavior that handles false call behavior.
Behavior of NetworkBehavior = NetworkBehavior.create ();
MockRetrofit mockRetrofit = new MockRetrofit.Builder (retrofit)
.networkBehavior (behavior)
.build();

BehaviorDelegate delegate = mockRetrofit.create (Webservice.class);
return new MockWebservice (delegate);
}
} 

Web.java service




package com.manupearls.unity.data.network;

import com.manupearls.unity.data.models.Manupost;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Query;



public interface web service {
@ Headers ("Cache-Control: no-cache")
@GET ("messages")
Call getPosts (
@Query ("key") string key,
@Query ("pageToken") string token
);
} 

PostRepository.Java




package com.manupearls.unity.data.repository;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.MutableLiveData;
import android.util.Log;

import com.manupearls.unity.data.models.Manupost;
import com.manupearls.unity.data.network.Webservice;
import com.manupearls.unity.ui.helpers.Constants;

import java.io.IOException;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;


Public Class PostRepository {
final webservice private web service;

Public PostRepository (web service web service) {
this.webservice = webservice;
}

LiveData getPosts (string token) {
Final data of MutableLiveData = new MutableLiveData ();
webservice.getPosts (Constants.BLOGGER_KEY, token) .enqueue (new Callback () {




@Cancel
public void onResponse (Calling, Response) {
yes (response.isSuccessful ()) {
data.setValue (response.body ());
}plus{
try {
Log.d ("network errors", response.errorBody (). String ());
} capture (IOException e) {
e.printStackTrace ();
}
}
}

@Cancel
public cancellation in case of failure (call, t tirable) {
Log.d ("network error", t.getMessage ());
}





});

return data;
}

} 

When I change the code Webservice.java @GET ("posts") by @GET ("https://www.googleapis.com/blogger/v3/blogs/2331406457490000588/posts?labels=firmware&key=") it works fine but does not return with lables