This package is the official API for the 30nama.com website.
const cinamaApi = require("official-30nama-api");
const packageJson = require("./package.json");
const storageHandler = (query) => {
console.log("[storageHandler]", query);
};
const emitHandler = (channel, message) => {
console.log(`[emitHandler] ${channel}:`, message);
};
const cacheHandler = (command) => {
console.log("[cacheHandler]", command);
}
const Client = new cinamaApi({
storageCallback: storageHandler,
emmiter: emitHandler,
cacheControl: cacheHandler,
formDataEngine: "qs",
retryMaxAttempts: 10,
basicMode: false, // NOTE: no need to inittialize on basicMode!
token: "[API_TOKEN]",
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
platform: "NodeJS",
preferredProtocol: "https",
appVersion: packageJson.version,
endPointBase: "64.227.66.212/app",
backupEndpoint: "https://raw.githubusercontent.com/EternalC0der/30nama/main/watchlist.json",
});
await Client.initialize();
- strictModeEnabled (msg: response)
- requestSuccess (msg: undefined)
- requestWarning (msg: apiResponse)
- requestFail (msg:
{ error, payload }
) - endpointUpdated (msg: protocol)
- terminateRequestRetry (msg: undefined)
- ContentProvider
- getNetworkReport
- checkStrictMode
- clearSession
- getProfile
- login
- loginV2
- checkEasyLoginCode
- register
- registerV2
- updateUserSession
- search
- searchAutoComplete
- advancedSearch
- sendComment
- observer
- dissmissHistoryItem
- addToGroupLibrary
- readNotification
- checkUpgrade
- checkDiscount
- useVoucher
- createTransactionCrypto
- createTransactionPerfectMoney
- createTransactionShaparak
- createTransactionCustom
- usePerfectMoneyVoucher
- UpgradeRedToGold
- fullSearch
- logout
- searchCollections
- updateUserInfo
- rateComment
- sendResetPasswordCode
- submitResetPassword
- ratePost
- loadBalancer
- updatePassword
- verifyAccount
- verifyAccountV2
- applyVoucherOrDiscount
- getVideoInfo
- getArchive
- getHomePage
- getGenreList
- getStreamHomePage
- getArticles
- getFullArticle
- getAdvancedSearchParameters
- getMenu
- getList
- getNotifications
- getPostOfUrl
- getGroupLibrary
- getFullLibrary
- getStreamData
- getPlans
- getTransactionsHistory
- getPlansFeatures
- getEasyLoginCode
- getUpgradeRedToGoldStatus
- getLiveEvent
- getWatchedHistory
- getUserInfoByToken
- getCharacters
- getBoxOffice
- getTopList
- getToS
- getDMCA
- getCollections
- getCollectionTitles
- getUserProfile
- getUserProfileList
- getVideoDownloads
- getComments
- getTransactionStatus
- getRequestsFormParameters
- getPricing