1.4.1 • Published 4 years ago

boehlerio-ticketapi v1.4.1

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

BOEHLER IO TICKET API INTEGRATION

Easily generate _ticket cookies by using our API

Installation

npm i boehlerio-ticketapi

Usage:

We've provided you with a key and the IP address of our US /EU servers if you're allowed to use our API

UserAgent (UA) , proxy and cookie/s need to be passed as string

Example proxy format: "http://username:password@ipAddress:port" // "http://ipAddress:port"

Make sure to adjust the file path of the wasm file. __dirname could be used instaed of app.getPath for example, depending on your project.

const TicketAPI = require('boehlerio-ticketapi')
const myTicket = new TicketAPI('your-key-here')

myTicket.setIPAddress(ipAddress)
myTicket.setUserAgent(proxy);

(async () => {
    try {
        const session = await myTicket.startSession(proxy)
        .catch(e => {
            console.log('error', e)
        })


        const ticket = await myTicket.generateTicket(cookie)
        .catch(e => {
            console.log('error', e)
        }) 

        console.log(ticket)
    } catch (error) {
        console.log(error)
    }
})()

A successful example response from startSession would look like:

{
  success: true,
  error: [],
  session: 'JKS5K-SUJKT-1W93W-0I7B8',
  'received size': 46748,
  timestamp: 1591797668729
}

IMPORTANT: Session response CAN be undefined! So startSession(proxy) would return undefined if getting the latest wasm source fails. Make sure to handle this case to prevent malfunctions.

A successful example response from generateTicket would look like:

{
  success: true,
  error: [],
  'key expiration date': null,
  session: 'JKS5K-SUJKT-1W93W-0I7B8',
  _ticket: '_ticket=637836a8844de1cf8587072ad69a75f5116caf39642ef5c6b78512506c516ab1266897df75bdcdcec92b6e74e97a50db7b489e3be221fc1493a9981dcb42b6141591797669',  
  userAgent: 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36',
  timing: '0.205 ms'
}
1.4.1

4 years ago

1.4.0

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago