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

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

Go to download

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

The newest version!
package com.contentstack.cms.stack;

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

import java.util.List;
import java.util.Map;

public interface EntryService {

    @GET("content_types/{content_type_uid}/entries")
    Call fetch(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @QueryMap(encoded = true) Map queryParameter);      

    @Headers("Content-Type: application/json")
    @GET("content_types/{content_type_uid}/entries/{entry_uid}")
    Call single(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryParameter);

    @Headers("Content-Type: application/json")
    @POST("content_types/{content_type_uid}/entries")
    Call create(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Body JSONObject requestBody,
            @QueryMap(encoded = true) Map queryParameter);

    @PUT("content_types/{content_type_uid}/entries/{entry_uid}")
    Call update(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Body JSONObject requestBody,
            @QueryMap(encoded = true) Map queryParameter);

    // Push, Pull, Add, Sub Operations
    @PUT("content_types/{content_type_uid}/entries/{entry_uid}")
    Call atomicOperations(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Body JSONObject body);

    @HTTP(method = "DELETE", path = "content_types/{content_type_uid}/entries/{entry_uid}", hasBody = true)
    Call delete(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Body JSONObject requestBody,
            @QueryMap(encoded = true) Map queryParameter);

    @POST("content_types/{content_type_uid}/entries/{entry_uid}/versions/{version_number}/name")
    Call versionName(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Path("version_number") String version,
            @Body JSONObject body);

    @GET("content_types/{content_type_uid}/entries/{entry_uid}/versions")
    Call detailOfAllVersion(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryOptions);

    @HTTP(method = "DELETE", path = "content_types/{content_type_uid}/entries/{entry_uid}/versions/{version_number}/name", hasBody = true)
    Call deleteVersionName(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Path("version_number") int version,
            @Body JSONObject body);

    @GET("content_types/{content_type_uid}/entries/{entry_uid}/references")
    Call reference(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryOptions);

    @GET("content_types/{content_type_uid}/entries/{entry_uid}/locales")
    Call language(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryOptions);

    @PUT("content_types/{content_type_uid}/entries/{entry_uid}")
    Call localize(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Query("locale") String localeCode,
            @Body JSONObject body);

    @POST("content_types/{content_type_uid}/entries/{entry_uid}/unlocalize")
    Call unLocalize(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Query("locale") String localeCode);

    @GET("content_types/{content_type_uid}/entries/{entry_uid}/export")
    Call export(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryOptions);

    @POST("content_types/{content_type_uid}/entries/import")
    Call imports(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @QueryMap(encoded = true) Map queryParameters);

    @POST("content_types/{content_type_uid}/entries/{entry_uid}/import")
    Call importExisting(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @QueryMap(encoded = true) Map queryParameters);

    @POST("content_types/{content_type_uid}/entries/{entry_uid}/publish")
    Call publish(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Body JSONObject requestBody);

    @POST("bulk/publish?x-bulk-action=publish")
    Call publishWithReference(
            @HeaderMap Map headers,
            @Body JSONObject requestBody,
            @QueryMap(encoded = true) Map queryParameters);

    @POST("content_types/{content_type_uid}/entries/{entry_uid}/unpublish")
    Call unpublish(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Path("entry_uid") String entryUid,
            @Body JSONObject requestBody);

    @GET("content_types/{content_type_uid}/entries")
    Call filterTaxonomy(
            @HeaderMap Map headers,
            @Path("content_type_uid") String contentTypeUid,
            @Query("query") JSONObject queryObject);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy