-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Following your documentation. I am using version 3.0.0. What am I doing wrong? How can I get the useful information using your module?
import PushBullet from 'pushbullet'
import { API_KEY } from './config.js'
const pusher = new PushBullet(API_KEY)
const me = await pusher.me()
console.log('Me:', me)
Gives:
Me: Response {
size: 0,
[Symbol(Body internals)]: {
body: PassThrough {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
stream: PassThrough {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
boundary: null,
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
type: 'default',
url: 'https://api.pushbullet.com/v2/users/me',
status: 200,
statusText: '',
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
connection: 'close',
'content-length': '353',
'content-type': 'application/json; charset=utf-8',
date: 'Mon, 31 Jul 2023 21:08:44 GMT',
via: '1.1 google',
'x-ratelimit-limit': '16384',
'x-ratelimit-remaining': '16369',
'x-ratelimit-reset': '1690840927'
},
counter: 0,
highWaterMark: 16384
}
}
But when I use curl with the same access token I get:
curl --header 'Access-Token: <access_token>' "https://api.pushbullet.com/v2/users/me"
{"active":true,"iden":"....}
Metadata
Metadata
Assignees
Labels
No labels