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

@cstools-app/faceit-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cstools-app/faceit-wrapper

<span class="badge-n

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Faceit Data API faceit-wrapper/Client for NodeJS

NPM version NPM downloads CodeQL Test package

• Description / Information

Still need to write more documentation and tests for this

Check the documentation for up to date information

• Installation

npm i @cstools-app/faceit-wrapper

You'll also need a fetch method I suggest isomorphic-unfetch or cross-fetch

Why do you need to supply a fetch method? This way people can use their own prefered way, it also means this can work in a serverless environment like cloudflare workers.

npm i isomorphic-unfetch

• Quick Start Example

import fetch from 'isomorphic-unfetch';
// Import the faceit-wrapper library
import FaceitAPI from '@cstools-app/faceit-wrapper';

// Initiate the client
const client = new FaceitAPI(api_key, fetch);

// Create a function that searches for a player
const get = async () => {
  const res = await client.search.players({ nickname: 'DotJar', game: 'csgo', country: 'nl' });

  console.log(res);
};

// Execute the function
get();

• Notes on methods

Naming conventions

ROUTE:: /leaderboards/championships/{championship_id}
METHOD:: leaderboards.championships.show({championship_id: <id>})
​ROUTE:: /leaderboards​/{leaderboard_id}
METHOD:: leaderboards.show()
ROUTE:: /championships
METHOD:: championships.get()
ROUTE:: /championships/{championship_id}
METHOD:: championships.show({championship_id: <id>, <params>})

Params

Params are automatically split into wildcards & query

Include the params and queries as listed on the Faceit documentation per route

• License

MIT

FAQs

Package last updated on 27 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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