zoro-to-api 中文文档教程

发布于 2年前 浏览 11 项目主页 更新于 2年前

Zoro.to API

Zoro.to API 的简单包装

文档

安装

# npm
npm install zoro-to-api

# yarn
yarn add zoro-to-api

基本用法

Javascript

const Zoro = require('zoro-to-api');

// Change Horimiya to whatever you want to search for
let zoroResults = await Zoro.zoroSearch("Horimiya")  

// Get the first result
let horimiya = zoroResults[0] 

// Get the info for the first result
let info = Zoro.getAnimeInfoByName(horimiya.eng_title); 

// Get the episodes for the first result
let eps = Zoro.getEpList(horimiya.eng_title); 

// Get the first episode
let firstEpisode = eps.episodes[0];

// Get the servers for the first episode
let servers = Zoro.getEpisodeServers(firstEpisode.epId); 

// Choose out of 4 servers
let subbed = servers.serversSub[0] 

// Get the stream server
let streamServer = Zoro.getStreamsById(subbed.serverId); 

// Your iframe link
console.log(streamServer.link) 

//* ⚠ Make sure you read the docs for the functions you use

Typescript

import Zoro from 'zoro-to-api';

...

贡献

Pull欢迎提出要求。对于重大更改,请先打开一个问题来讨论您想要更改的内容。 确保适当更新测试。

许可证

MIT

Zoro.to API

A simple wrapper for the Zoro.to API

Documentation

Installation

# npm
npm install zoro-to-api

# yarn
yarn add zoro-to-api

Basic Usage

Javascript

const Zoro = require('zoro-to-api');

// Change Horimiya to whatever you want to search for
let zoroResults = await Zoro.zoroSearch("Horimiya")  

// Get the first result
let horimiya = zoroResults[0] 

// Get the info for the first result
let info = Zoro.getAnimeInfoByName(horimiya.eng_title); 

// Get the episodes for the first result
let eps = Zoro.getEpList(horimiya.eng_title); 

// Get the first episode
let firstEpisode = eps.episodes[0];

// Get the servers for the first episode
let servers = Zoro.getEpisodeServers(firstEpisode.epId); 

// Choose out of 4 servers
let subbed = servers.serversSub[0] 

// Get the stream server
let streamServer = Zoro.getStreamsById(subbed.serverId); 

// Your iframe link
console.log(streamServer.link) 

//* ⚠ Make sure you read the docs for the functions you use

Typescript

import Zoro from 'zoro-to-api';

...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Make sure to update tests as appropriate.

License

MIT

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文