1.1.3 • Published 2 years ago

furongyun v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Install

yarn add furongyun

Example

import { FuRong } from 'furongyun'

const furong = new FuRong()

const sleep = (s: number) => new Promise(resolve => setTimeout(resolve, s * 1000))

async function main() {
  await furong.login('username', 'password')
  const mobileInfo = await furong.getMobile({
    project_id: '128807'
  })
  console.log('mobileInfo', mobileInfo)
  let i = 0
  const timer = setInterval(async () => {
    if (i >= 10) {
      clearInterval(timer)
      return
    }
    const messageInfo = await furong.getMessageCode({
      project_id: '128807',
      phone_num: mobileInfo?.mobile!
    })
    console.log('messageInfo', messageInfo)
    i++
  }, 3000)

  const releaseInfo = await furong.releaseMobile({
    project_id: '128807',
    phone_num: mobileInfo?.mobile!
  })
  console.log('releaseInfo', releaseInfo)
}
main()

引用

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.3

2 years ago

1.0.0

2 years ago