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

com.cleeng.api.Cleeng Maven / Gradle / Ivy

Go to download

When you are building your website or application with Java, you can use the Cleeng Java SDK. It simplifies the use of the Cleeng API as it handles user login and content access, and deals with all JSON-RPC specific code.

There is a newer version: 2.8.2
Show newest version
package com.cleeng.api;

import com.cleeng.api.domain.*;
import com.cleeng.api.domain.async.AsyncRequest;

import java.io.IOException;
import java.util.List;

/**
 * Cleeng API. Set of methods to interact with Cleeng platform.
 * 
 */
public interface Cleeng {

	HttpClient getClient();

	/**
	 * Creates a subscription offer.
*
* * @param offerData domain object representing offer data * @return */ OfferResponse createSubscriptionOffer(SubscriptionOfferData offerData) throws IOException; /** * Creates subscription offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void createSubscriptionOfferAsync(List requests) throws IOException, InterruptedException; /** * Updates a subscription offer.
*
* * @param offerData domain object representing offer data * @param offerId offer id * @return */ OfferResponse updateSubscriptionOffer(SubscriptionOfferData offerData, String offerId) throws IOException; /** * Updates subscription offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void updateSubscriptionOfferAsync(List requests) throws IOException, InterruptedException; /** * Creates a single offer.
*
* * @param offerData domain object representing single offer data * @return */ SingleOfferResponse createSingleOffer(SingleOfferData offerData) throws IOException; /** * Creates single offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void createSingleOfferAsync(List requests) throws IOException, InterruptedException; /** * Updates a single offer.
*
* * @param offerData domain object representing single offer data * @return */ SingleOfferResponse updateSingleOffer(String offerId, SingleOfferData offerData) throws IOException; /** * Updates single offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void updateSingleOfferAsync(List requests) throws IOException, InterruptedException; /** * Creates an event offer.
*
* * @param offerData domain object representing event offer data * @return */ EventOfferResponse createEventOffer(EventOfferData offerData) throws IOException; /** * Creates an event offers (async).
*
* * @param requests * @throws IOException * @throws InterruptedException */ void createEventOfferAsync(List requests) throws IOException, InterruptedException; /** * Updates an event offer.
*
* * @param offerData domain object representing event offer data * @param offerId offer Id * @return */ EventOfferResponse updateEventOffer(EventOfferData offerData, String offerId) throws IOException; /** * Updates event offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void updateEventOfferAsync(List requests) throws IOException, InterruptedException; /** * Creates a rental offer.
*
* * @param offerData domain object representing rental offer data * @return */ RentalOfferResponse createRentalOffer(RentalOfferData offerData) throws IOException; /** * Creates rental offers (async).
*
* * @param requests * @throws IOException * @throws InterruptedException */ void createRentalOfferAsync(List requests) throws IOException, InterruptedException; /** * Updates a rental offer.
*
* * @param offerData domain object representing rental offer data * @param offerId offer Id * @return */ RentalOfferResponse updateRentalOffer(RentalOfferData offerData, String offerId) throws IOException; /** * Updates rental offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void updateRentalOfferAsync(List requests) throws IOException, InterruptedException; /** * Creates a pass offer.
*
* * @param offerData domain object representing pass offer data * @return */ PassOfferResponse createPassOffer(PassOfferData offerData) throws IOException; /** * Updates a pass offer.
*
* * @param offerData domain object representing pass offer data * @param offerId offer Id * @return */ public OfferResponse updatePassOffer(PassOfferData offerData, String offerId) throws IOException; /** * Updates pass offers (async) *
* * @param requests * @throws IOException * @throws InterruptedException */ void updatePassOfferAsync(List requests) throws IOException, InterruptedException; /** * Creates pass offers (async).
*
* * @param requests * @throws IOException * @throws InterruptedException */ void createPassOfferAsync(List requests) throws IOException, InterruptedException; /** * Lists subscription offers.
*
* * @param criteria domain object representing search criteria * @param offset pagination offset * @param limit pagination's items per page * @return */ ListSubscriptionOffersResponse listSubscriptionOffers(Criteria criteria, int offset, int limit) throws IOException; /** * Lists subscription offers (async).
*
* * @param requests collection of AsyncListRequest objects * @throws IOException * @throws InterruptedException */ void listSubscriptionOffersAsync(List requests) throws IOException, InterruptedException; /** * Lists single offers.
*
* * @param criteria domain object representing search criteria * @param offset pagination offset * @param limit pagination's items per page * @return */ ListSingleOffersResponse listSingleOffers(Criteria criteria, int offset, int limit) throws IOException; /** * Lists single offers (async).
*
* * @param requests collection of AsyncListRequest objects * @throws IOException * @throws InterruptedException */ void listSingleOffersAsync(List requests) throws IOException, InterruptedException; /** * Lists vod offers.
*
* * @param criteria domain object representing search criteria * @param offset pagination offset * @param limit pagination's items per page * @return */ ListVodOffersResponse listVodOffers(Criteria criteria, int offset, int limit) throws IOException; /** * Lists vod offers (async).
*
* * @param requests collection of AsyncListRequest objects * @throws IOException * @throws InterruptedException */ void listVodOffersAsync(List requests) throws IOException, InterruptedException; /** * Lists pass offers.
*
* * @param criteria domain object representing search criteria * @param offset pagination offset * @param limit pagination's limit * @return */ ListPassOffersResponse listPassOffers(Criteria criteria, int offset, int limit) throws IOException; /** * Lists pass offers (async).
*
* * @param requests collection of AsyncListRequest objects * @throws IOException * @throws InterruptedException */ void listPassOffersAsync(List requests) throws IOException, InterruptedException; /** * Prepares a remote auth.
*
* * @param customerData domain object representing customer's data * @param flowDescription domain object representing flow description * @return */ PrepareRemoteAuthResponse prepareRemoteAuth(CustomerData customerData, FlowDescription flowDescription) throws IOException; /** * Prepares a remote auth (async).
*
* * @param requests collection of AsyncPrepareRemoteAuthRequest objects * @throws IOException * @throws InterruptedException */ void prepareRemoteAuthAsync(List requests) throws IOException, InterruptedException; /** * Generates a customer token.
*
* * @param customerEmail customer's email * @return */ TokenResponse generateCustomerToken(String customerEmail) throws IOException; /** * Generates a customer token (async)
*
* * @param requests collection of AsyncTokenRequest objects * @return */ void generateCustomerTokenAsync(List requests) throws IOException, InterruptedException; /** * Requests user's password reset.
*
* * @param customerEmail customer's email * @return */ BooleanResponse requestPasswordReset(String customerEmail) throws IOException; /** * Requests user's password reset (async).
*
* * @param requests collection of AsyncRequest objects * @return */ void requestPasswordResetAsync(List requests) throws IOException, InterruptedException; /** * Updates user's password.
*
* * @param customerEmail customer's email * @param resetPasswordToken token received on email * @param newPassword new password * @return */ BooleanResponse updateCustomerPassword(String customerEmail, String resetPasswordToken, String newPassword) throws IOException; /** * Updates customer password (async).
*
* * @param requests collection of AsyncRequest objects * @return */ public void updateCustomerPasswordAsync(List requests) throws IOException, InterruptedException; /** * Updates user's email.
*
* * @param customerEmail customer's email * @param newEmail new email * @return */ BooleanResponse updateCustomerEmail(String customerEmail, String newEmail) throws IOException; /** * Updates customer email (async).
*
* * @param requests collection of AsyncRequest objects * @return */ public void updateCustomerEmailAsync(List requests) throws IOException, InterruptedException; /** * Generates a customer token from facebook.
*
* * @param facebookId facebook login * @return */ TokenResponse generateCustomerTokenFromFacebook(String facebookId) throws IOException; /** * Generates a customer token from facebook (async)
*
* * @param requests collection of AsyncTokenRequest objects * @return */ void generateCustomerTokenFromFacebookAsync(List requests) throws IOException, InterruptedException; /** * Generates a customer token from password.
*
* * @param password password * @return */ TokenResponse generateCustomerTokenFromPassword(String password, String customerEmail) throws IOException; /** * Generates a customer token from password (async)
*
* * @param requests collection of AsyncTokenRequest objects * @return */ void generateCustomerTokenFromPasswordAsync(List requests) throws IOException, InterruptedException; /** * Gets access status.
*
* * @param customerToken customer token * @param offerId offer Id * @param ipAddress IP address * @return */ GetAccessStatusResponse getAccessStatus(String customerToken, String offerId, String ipAddress) throws IOException; /** * Gets access status (async)
*
* * @param requests collection of AsyncGetAccessStatusRequest objects * @return */ public void getAccessStatusAsync(List requests) throws IOException, InterruptedException; /** * Get accessible tags.
*
* * @param publisherToken publisher's token * @param customerToken customer's token * @return */ GetAccessibleTagsResponse getAccessibleTags(String publisherToken, String customerToken) throws IOException; /** * Gets accessible tags (async)
*
* * @param requests collection of AsyncGetAccessibleTagsRequest objects * @return */ void getAccessibleTagsAsync(List requests) throws IOException, InterruptedException; /** * Get customer
*
* * @param customerToken customer's token * @return */ GetCustomerResponse getCustomer(String customerToken) throws IOException; /** * Get customer (async)
*
* * @param requests collection of AsyncRequest objects * @return */ void getCustomerAsync(List requests) throws IOException, InterruptedException; /** * Creates Vod offer
*
* * @param offerData vod offer data * @return */ VodOfferResponse createVodOffer(VodOfferData offerData) throws IOException; /** * Creates Vod offer (async)
*
* * @param requests collection of AsyncRequest objects * @return */ void createVodOfferAsync(List requests) throws IOException, InterruptedException; /** * Gets Vod offer
*
* * @param offerId an id of an offer * @return */ public VodOfferResponse getVodOffer(String offerId) throws IOException; /** * Gets Vod offer (async)
*
* * @param requests collection of AsyncRequest objects * @return */ public void getVodOfferAsync(List requests) throws IOException, InterruptedException; /** * Updates Vod offer
*
* * @param offerId offer id * @param offerData vod offer data * @return */ public VodOfferResponse updateVodOffer(String offerId, VodOfferData offerData) throws IOException; /** * Updates Vod offer(s) (async)
*
* * @param requests collection of AsyncRequest objects * @return */ public void updateVodOfferAsync(List requests) throws IOException, InterruptedException; /** * Generates a checkout url * * @param customerEmail vod offer data * * @return * @throws IOException */ public UrlResponse generateCheckoutUrl(String customerEmail, FlowDescription flowDescription) throws IOException; /** * Generates checkout urls (async)
*
* * @param requests collection of AsyncRequest objects * @return */ public void generateCheckoutUrlAsync(List requests) throws IOException, InterruptedException; /** * Registers a customer * * @param data customer data * * @return * @throws IOException */ public TokenResponse registerCustomer(CustomerData data) throws IOException; /** * Registers customers (async)
*
* * @param requests collection of AsyncRequest objects * @return */ public void registerCustomerAsync(List requests) throws IOException, InterruptedException; /** * Generates my account url
*
* * @param customerEmail customer email * @param modules lis of modules * @return */ UrlResponse generateMyAccountUrl(String customerEmail, List modules) throws IOException; /** * Generates my account url (async)
*
* * @param requests collection of AsyncRequest objects * @return */ void generateMyAccountUrlAsync(List requests) throws IOException, InterruptedException; /** * Gets offerIds by video id
*
* * @param videoId video Id * @return */ ListOfferIdsByVideoIdResponse listOfferIdsByVideoId(String videoId) throws IOException; /** * Gets offerIds by video id (async)
*
* * @param requests collection of AsyncRequest objects * @return */ void listOfferIdsByVideoIdAsync(List requests) throws IOException, InterruptedException; /** * Checks whether access to offer is granted
*
* * @param customerToken customer token * @param offerId offer id * @param deviceId device id * @param deviceType device type * @return */ GetAccessStatusForDeviceResponse getAccessStatusForDevice(String customerToken, String offerId, String deviceId, String deviceType) throws IOException; /** * Checks whether access to offer is granted
*
* * @param requests collection of AsyncRequest objects * @return */ void getAccessStatusForDeviceAsync(List requests) throws IOException, InterruptedException; /** * Invokes a batch request (async)
*
* * @param batch object containing a collection of individual requests * @return */ void invokeBatchAsync(BatchAsyncRequest batch) throws IOException, InterruptedException; /** * Invokes a batch request
*
* * @param batch object containing a collection of individual requests * @return */ public BatchResponse invokeBatch(BatchRequest batch) throws IOException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy