@tng/gta

1.0.4 • Public • Published

TNG GTA

安装

yarn add @tng/gta

使用

const GTA = require('@tng/gta')
const gta = new GTA({url:'https://gta.teambition.net/v1/track/', token: '1234567890'})

// send方法 (get)
// @return promise
console.log(yield gta.send('event', { param: 'abc' }))  
// {event: 1}


// 指定 options
const gta = new GTA()
const options = { url: 'https://gta.teambition.net/v1/track/', token: '1234567890'})
console.log(yield gta.send('event', { param: 'abc' }, options))

// get/post方法
const gta = new GTA()
const options = { url: 'https://gta.teambition.net/v1/track/'})
yield gta.get('event', { token: '1234567890', params: 'abc' }, options)
yield gta.post('event', { token: '1234567890', params: 'abc' }, options)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    0
    • latest

Version History

Package Sidebar

Install

npm i @tng/gta

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

4.51 kB

Total Files

5

Last publish

Collaborators

  • aerohui
  • isayme
  • orangemi