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

com.contentstack.cms.stack.ExtensionsService Maven / Gradle / Ivy

Go to download

Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an API-first approach

There is a newer version: 1.5.0
Show newest version
package com.contentstack.cms.stack;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import org.json.simple.JSONObject;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

public interface ExtensionsService {

    @GET("extensions")
    Call getAll(
            @HeaderMap Map headers,
            @QueryMap(encoded = true) Map query);

    @GET("extensions/{custom_field_uid}")
    Call getSingle(
            @HeaderMap Map headers,
            @Path("custom_field_uid") String customFieldUid,
            @QueryMap(encoded = true) Map queryParameter);

    @Multipart
    @POST("extensions")
    Call uploadCustomField(
            @HeaderMap Map headers,
            @PartMap Map params,
            @QueryMap(encoded = true) Map queryParameter);

    @POST("extensions")
    Call uploadCustomField(
            @HeaderMap Map headers,
            @QueryMap(encoded = true) Map queryParameter,
            @Body JSONObject body);

    @PUT("extensions/{custom_field_uid}")
    Call update(
            @HeaderMap Map headers,
            @Path("custom_field_uid") String customFieldUid,
            @QueryMap(encoded = true) Map queryParameter,
            @Body JSONObject body);

    @DELETE("extensions/{custom_field_uid}")
    Call delete(
            @HeaderMap Map headers,
            @Path("custom_field_uid") String customFieldUid);

    @POST("content_types")
    Call createContentTypeWithExtensionField(
            @HeaderMap Map headers,
            @QueryMap(encoded = true) Map queryParameter,
            @Body JSONObject body);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy