@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)

    Keywords

    none

    Install

    npm i @tng/gta

    DownloadsWeekly Downloads

    2

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    4.51 kB

    Total Files

    5

    Last publish

    Collaborators

    • aerohui
    • isayme
    • orangemi