com.taboola.backstage.internal.BackstageDictionaryEndpoint Maven / Gradle / Ivy
package com.taboola.backstage.internal;
import com.taboola.backstage.exceptions.BackstageAPIException;
import com.taboola.backstage.model.Results;
import com.taboola.backstage.model.dictionary.Resource;
import retrofit2.http.*;
/**
* Created by vladi
* Date: 10/17/2017
* Time: 11:27 PM
* By Taboola
*/
public interface BackstageDictionaryEndpoint {
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/{dictionary_suffix}")
@Headers("Content-Type: application/json")
String custom(@Header("Authorization") String authToken, @Path(value = "dictionary_suffix", encoded = true) String dictionarySuffix) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources")
@Headers("Content-Type: application/json")
Results getRoot(@Header("Authorization") String authToken) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/countries")
@Headers("Content-Type: application/json")
Results getCountries(@Header("Authorization") String authToken) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/countries/{country_code}/regions")
@Headers("Content-Type: application/json")
Results getSpecificCountryRegions(@Header("Authorization") String authToken, @Path("country_code") String countryCode) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/countries/{country_code}/postal")
@Headers("Content-Type: application/json")
Results getSpecificCountryPostals(@Header("Authorization") String authToken, @Path("country_code") String countryCode) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/countries/US/dma")
@Headers("Content-Type: application/json")
Results getUnitedStatesDMA(@Header("Authorization") String authToken) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/platforms")
@Headers("Content-Type: application/json")
Results getPlatforms(@Header("Authorization") String authToken) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/campaigns_properties/operating_systems")
@Headers("Content-Type: application/json")
Results getOperationSystem(@Header("Authorization") String authToken) throws BackstageAPIException;
@GET(BackstagePaths.BACKSTAGE_API_PATH_PREFIX + "/resources/campaigns_properties/operating_systems/{operation_system}")
@Headers("Content-Type: application/json")
Results getOperationSystemSubCategories(@Header("Authorization") String authToken, @Path("operation_system") String operationSystem) throws BackstageAPIException;
}