Code Monkey home page Code Monkey logo

hoyorandom-php's Introduction

HoYoRandom-php

GitHub commit activityGitHub Repo starsGitHub forks
包括原神&崩坏3精选图片、音乐、视频以及名台词.
欢迎ForkPR;

项目网站

开发进度

  • 给视频加上CDN
  • 从Git获取文件列表,使API与资源分离
  • 提高较小视频的画质
  • 使用nodejs重写 (进行中)

镜像存储库

你可以在任何一处查看q(≧▽≦q)
Github
Gitee
Coding

资源仓库

点击前往


使用方法

API地址

https://api.dreamofice.cn/hoyorandom/

注意,本站已启用全站HSTS,并加入HSTS Preload,仅接受HTTPS访问.

请求地址

类型 地址 资源列表
图片 /img 链接
音乐 /music 链接
视频 /video 链接
一言 /hitokoto 链接

请求参数

参数 默认值 备注
game ys,bh3 随机选取
type raw,json raw 不适用于一言接口
encode text,js,json json 仅限于一言接口
selete 任意CSS选择器 #hitokoto 仅当一言接口的encode为js时有效

返回示例

图片示例

默认

随机图片

Json

{
    "name": "83ef76b315707993d5734222936cfa2f4aa30ede.webp",
    "url": "https://cdn.dreamofice.cn/HoYoRandomResources/img/bh3/83ef76b315707993d5734222936cfa2f4aa30ede.webp"
}

音频示例

默认

似乎不支持预览(っ °Д °;)っ

Json

{
    "name": "陈致逸,HOYO-MiX - Rex Incognito 尘世闲游.mp3",
    "url": "https://cdn.dreamofice.cn/p/HoYoRandomResources/music/ys/陈致逸,HOYO-MiX - Rex Incognito 尘世闲游.mp3"
}

视频示例

默认

Json

{
    "name": "24277076-1-208.mp4",
    "url": "https://cdn.dreamofice.cn/HoYoRandomResources/video/bh3/24277076-1-208.mp4"
}

一言示例

Json(默认)

{
    "hitokoto": "最初的鸟儿是不会飞翔的,飞翔是它们勇敢跃入峡谷的奖励"
}

javaScript

document.querySelector('#hitokoto').innerText='最初的鸟儿是不会飞翔的,飞翔是它们勇敢跃入峡谷的奖励';

纯文本

最初的鸟儿是不会飞翔的,飞翔是它们勇敢跃入峡谷的奖励

部署

deploy.md

LICENSE

GNU GENERAL PUBLIC LICENSE 3.0

hoyorandom-php's People

Contributors

dreamofice avatar creeper-2077 avatar

Stargazers

Sakura avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.