@chiper-inc/chiper-sdk
v1.2.8
Published
Sdk to interact with Citrus Ad, a platform for advertising and monetization
Downloads
256
Keywords
Readme
Chiper SDK
Chiper SDK has been built using typescript.
Sdk to interact with Citrus Ad, a platform for advertising and monetization, and TopSort, a native advertising infrastructure based on auctions and APIs.
Read all documentation before start
Learn and Understand:
How To Install
Simply type the following into a terminal window:
npm i @chiper-inc/chiper-sdk
How to Use Citrus
// import entire SDK
import { Citrus } from "@chiper-inc/chiper-sdk";
// Create an instance
const CitrusTest = Citrus.getInstance({
baseUrl: "https://mytest/sdk.com",
apiKey: "123-abc-345-def",
});
// Report Events
const reportClick = CitrusTest.reportClick("adId");
const reportImpression = CitrusTest.reportImpression("adId");
const reportPurchase = CitrusTest.reportPurchase(orders);
For more examples visit the following links
How to Use TopSort
// import entire SDK
import { TopSort } from "@chiper-inc/chiper-sdk";
// Create an instance
const TopsortTest = TopSort.getInstance({
baseUrl: "https://mytest/sdk.com",
token: "123-abc-345-def",
});
const payload = {
{
session: {
sessionId: "ebeaf802-6d0a-41a3-ae59-661887c4f6cb",
},
placement: {
page: "search_results",
},
productId: "p_SA0238",
ocurredAt: "2022-04-26T12:57:31.450Z",
}
}
// Report Events
const reportClick = TopsortTest.reportClick(payload);
const reportImpression = TopsortTest.reportImpression(payload2);
const reportPurchase = TopsortTest.reportPurchase(payload3);
For more examples visit the following links