All Downloads are FREE. Search and download functionalities are using the official Maven repository.

services.BrandsInterface Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package services;

import models.Brand;
import models.BrandCreateBody;
import models.BrandUpdateBody;
import models.Brands;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.PUT;

public interface BrandsInterface {
    @GET("/brands")
    Call getBrands(
            @Header("Authorization") String authorization,
            @Header("User-Agent") String userAgent
    );

    @GET("/brands/{brandId}")
    Call getBrand(
            @Path("brandId") String brandId,
            @Header("Authorization") String authorization,
            @Header("User-Agent") String userAgent
    );

    @POST("/brands")
    Call postBrand(
            @Body BrandCreateBody brand,
            @Header("Authorization") String authorization,
            @Header("User-Agent") String userAgent
    );

    @PUT("/brands/{brandId}")
    Call putBrand(
            @Path("brandId") String brandId,
            @Body BrandUpdateBody brand,
            @Header("Authorization") String authorization,
            @Header("User-Agent") String userAgent
    );

    @DELETE("/brands/{brandId}")
    Call deleteBrand(
            @Path("brandId") String brandId,
            @Header("Authorization") String authorization,
            @Header("User-Agent") String userAgent
    );
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy