1.0.0 • Published 9 months ago

forest-api v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

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

1.0.0

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago