forest-api

1.0.0 • Public • Published

forest-api

forest-api is a tool to call api https://www.forestapi.my.id which functions to get data about YouTube such as data about channels and about YouTube video and others social media. This API frequently experiences internal server error 500.

Installation

    npm install forest-api

Usage

getYoutubeChannel(channel)

You just put channel name in parameter. example :

import { getYoutubeChannel } from "forest-api";

(async () => {
    try {
        const response = await getYoutubeChannel(channelName)
        console.log(response)
    } catch (error) {
        console.error("error:", error)
    }
})()

response :

{
  status: true,
  id: 'example id',
  name: 'example name',
  description: 'example description',
  image_url: 'example image_url'
}

getYoutubeVideo(idVideo)

You just put id video in parameter example :

import { getYoutubeVideo } from "forest-api";

(async () => {
    try {
        const response = await getYoutubeVideo(idVideo)
        console.log(response)
    } catch (error) {
        console.error("error:", error)
    }
})()

response:

{
  "status": true,
  "id": "Video ID",
  "title": "Video Title",
  "description": "Video Description",
  "viewers": "Video Viewers",
  "author": "Video Author",
  "thumbnails": [
    {
      "url": "Video Thumbnail URL",
      "width": "Video Thumbnail Width",
      "height": "Video Thumbnail Height"
    }
  ],
  "videos": [
    {
      "url": "Video URL",
      "type": "Video Type",
      "size": "Video Size",
      "quality": "Video Resolution"
    }
  ]
}

Telegram

  • getTelegramUser(username)
  • getTelegramChannel(username)
  • getTelegramGroup(idOrUsername)

Instagram

  • getInstagramAccount(username)
  • getInstagramPhoto(id)

Facebook

  • getFacebookUser(username)
  • getFacebookVideo(id)
  • getFacebookPage(username)
  • getFacebookGroup(idOrUsername)

Tiktok

  • getTiktokUser(username)
  • getTiktokVideo(username, id)

Github

  • getGithubUser(username)
  • getGithubRepository(username)
  • getGithubFollowers(username)
  • getGithubFollowing(username)
  • getGithubStars(username)
  • getGithubRepoInformation(username, repository)
  • getGithubRepoStars(username, repository)
  • getGithubRepoForks(username, repository)

Semoga Membantu

Readme

Keywords

Package Sidebar

Install

npm i forest-api

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

6.61 kB

Total Files

3

Last publish

Collaborators

  • fauzanhusain