Skip to content

Commit

Permalink
Added ZeroChan website n fixing some
Browse files Browse the repository at this point in the history
  • Loading branch information
iseizuu committed Aug 10, 2022
1 parent bb1b8dc commit 11ff2fa
Show file tree
Hide file tree
Showing 18 changed files with 244 additions and 174 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Get Anime wallpapers based on scrapping from websites.
###### [Documentation](https://iseizuu.github.io/anime-wallpaper/)

# Example Usage
- Getting Wallpaper from [Alphacoders](https://alphacoders.com)
- Getting Wallpaper from [Alphacoders](https://alphacoders.com) (dynamic) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
const { AnimeWallpaper } = require("anime-wallpaper");
Expand All @@ -24,10 +24,10 @@ async function Wallpaper1() {
return console.log(wallpaper)
}

Wallpaper1()
Wallpaper1()
```

- ~~Getting Wallpaper from [Wallpaper Cave](https://wallpapercave.com)~~
- ~~Getting Wallpaper from [Wallpaper Cave](https://wallpapercave.com)~~ <img align="center" width="15" src="https://cdn.discordapp.com/emojis/743459759302377574.webp?size=128&quality=lossless">

```js
async function Wallpaper2() {
Expand All @@ -38,7 +38,7 @@ async function Wallpaper2() {
Wallpaper2()
```

- Getting Ramdon Wallpaper from [4K Wallpapers](https://free4kwallpapers.com/)
- Getting Random Wallpaper from [4K Wallpapers](https://free4kwallpapers.com/) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
async function Wallpaper3() {
Expand All @@ -49,7 +49,7 @@ async function Wallpaper3() {
Wallpaper3()
```

- Getting Wallpaper from [WallHaven](https://wallhaven.cc)
- Getting Wallpaper from [WallHaven](https://wallhaven.cc) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
async function Wallpaper4() {
Expand All @@ -60,6 +60,19 @@ async function Wallpaper4() {
Wallpaper4()
```

- Getting Wallpaper from [ZeroChan](https://www.zerochan.net) (dynamic) <img align="center" width="15" src="https://cdn.discordapp.com/emojis/735119429016485920.webp?size=128&quality=lossless">

```js
async function Wallpaper5() {
const wallpaper = await wall.getAnimeWall5("Makima")
return console.log(wallpaper)
}

Wallpaper5()
```
### IMPORTANT!!!!
Nb: function which has *dynamic* tag sometimes image url doesn't load or render because it's a dynamic website, you can re-fetch again to get image url

<hr>

© [Aizuu](https://github.com/iseizuu)
23 changes: 15 additions & 8 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnimeWall1, AnimeWall2, AnimeWall3, searchOpt, searchOpt2 } from "./typings";
import { dataImageFormat1, dataImageFormat2, dataImageFormat3, searchOpt, searchOpt2 } from "./typings";
export declare class AnimeWallpaper {
constructor();
/**
Expand All @@ -7,32 +7,39 @@ export declare class AnimeWallpaper {
* @param {Object}
* @param {string} title.search the title of anime you want to search.
* @param {string|number} title.page the page for image you want to search.
* @returns {AnimeWall1}
* @returns {dataImageFormat1}
*/
getAnimeWall1(title: searchOpt): Promise<AnimeWall1[]>;
getAnimeWall1(title: searchOpt): Promise<dataImageFormat1[]>;
/**
* Scraping images wallpaper from WallpaperCave
*
* @param title the title of anime that you want to search.
* @returns {AnimeWall2}
* @returns {dataImageFormat2}
*/
private getAnimeWall2;
/**
* Scraping images wallpaper from free4kWallpaper
*
* this function will be return random anime wallpaper
*
* @returns {AnimeWall2}
* @returns {dataImageFormat2}
*/
getAnimeWall3(): Promise<AnimeWall2[]>;
getAnimeWall3(): Promise<dataImageFormat2[]>;
/**
* Scraping images wallpaper from WallHaven
*
* @param search.title the title of the anime you want to search.
* @param search.type the type or purity of image sfw or sketchy image or even both.
* @param search.page the page for image you want to search, default is 1
* @returns {AnimeWall3}
* @returns {dataImageFormat3}
*/
getAnimeWall4(search: searchOpt2): Promise<AnimeWall3[]>;
getAnimeWall4(search: searchOpt2): Promise<dataImageFormat3[]>;
/**
* Scraping images wallpaper from zerochan
*
* @param title the title of anime that you want to search.
* @returns {dataImageFormat2}
*/
getAnimeWall5(title: string): Promise<dataImageFormat1[]>;
private _request;
}
59 changes: 30 additions & 29 deletions dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export interface AnimeWall1 {
export interface dataImageFormat1 {
title: string;
thumbnail: string;
image: string;
}
export interface AnimeWall2 {
export interface dataImageFormat2 {
title: string;
image: string;
}
export interface AnimeWall3 {
export interface dataImageFormat3 {
image: string;
}
export interface searchOpt {
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

Loading

0 comments on commit 11ff2fa

Please sign in to comment.