Options
All
  • Public
  • Public/Protected
  • All
Menu

获取指定github仓库完整信息

新增于v0.0.21

脚本举例

  import { Github } from '@tomato-js/api'
  const api = new Github({
    token:'your_token', // github的token
  });
  (async()=>{
    const data = await api.getRepoData('brizer','mrgx');
  })()
  //{
  //  stargazers_count:20,
  //  ...
  //}

Hierarchy

  • Github

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private request

Methods

getRepoData

  • getRepoData(owner: string, repo: string): Promise<{ stargazers: any }>
  • 获取github库信息

    新增于v0.0.21

    脚本举例

      import { Github } from '@tomato-js/api'
      const api = new Github({
        token:'your_token', // github的token
      });
      (async()=>{
        const data = await api.getRepoData('brizer','mrgx');
      })()
      //{
      //  stargazers_count:20,
      //  ...
      //}

    Parameters

    • owner: string

      拥有者

    • repo: string

      包名称

    Returns Promise<{ stargazers: any }>

    信息

Generated using TypeDoc