Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hqtrivia-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hqtrivia-api - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

2

package.json
{
"name": "hqtrivia-api",
"version": "1.6.0",
"version": "1.7.0",
"description": "HQ Trivia API wrapper for Node.js",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -21,2 +21,4 @@ # HQ Trivia API

- `hq.setToken(token)` - Sets token for requests
- `hq.changeUsername(username)` - Change username
- `hq.checkUsername(username)` - Check username

@@ -23,0 +25,0 @@ ## Registration methods

@@ -119,2 +119,24 @@ const axios = require('axios')

async changeUsername (username) {
if (!this.token) throw new Error('This method cannot be used without authorization')
const changeUsernameResp = await this.axios.patch('/users/me', {
username: username
})
return changeUsernameResp.data
}
async checkUsername (username) {
if (!this.token) throw new Error('This method cannot be used without authorization')
const checkUsernameResp = await this.axios.post('/usernames/available', {
username: username
})
return checkUsernameResp.data
}
async easterEgg (type = 'makeItRain') {
if (!this.token) throw new Error('This method cannot be used without authorization')
const easterEggResp = await this.axios.post(`/easter-eggs/${type}`)
return easterEggResp.data
}
async searchUsers (query) {

@@ -121,0 +143,0 @@ if (!this.token) throw new Error('This method cannot be used without authorization')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc