official-30nama-api
TypeScript icon, indicating that this package has built-in type declarations

1.3.195 • Public • Published

Official 30nama API

This package is the official API for the 30nama.com website.

Usage

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();

Emmiter events

  • strictModeEnabled (msg: response)
  • requestSuccess (msg: undefined)
  • requestWarning (msg: apiResponse)
  • requestFail (msg: { error, payload })
  • endpointUpdated (msg: protocol)
  • terminateRequestRetry (msg: undefined)

Utils

  • ContentProvider
  • getNetworkReport
  • checkStrictMode
  • clearSession
  • getProfile

Calls

  • 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

Readme

Keywords

Package Sidebar

Install

npm i official-30nama-api

Weekly Downloads

1

Version

1.3.195

License

ISC

Unpacked Size

204 kB

Total Files

16

Last publish

Collaborators

  • eternalc0der
  • devinedecrypter