npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

competition-client

v1.0.12

Published

## Installation

Readme

Tulula gaming SDK

Installation

Run in console npm i --save competition-client or add the package "competition-client": "1.0.11" in package.json file.

The stable version of the package is ^1.0.11

Init the game

Import the package

import CompetitionClient from 'competition-client'

and create a game instance

The apiEndpoint parameter is https://tulu.la by default, contestId and spaceSlug parameters will be given to you by tulu.la.

Sign up with email

To register in the platform you have to use signUpWithEmail method:

If there will be any errors during authorization, the SIGN_UP_FAILED error will be thrown.

Sign in with email

To login in the platform you have to use signInWithEmail method:

If there will be any errors during authorization, the SIGN_IN_FAILED error will be thrown.

OAuth2

There are two properties in the game instance: signInGoogleUrl and signInFacebookUrl.

To sign in using OAuth2, you have to redirect user to selected social.

<a :href="game.signInGoogleUrl">Sign in with Google</a>

or

<a :href="game.signInFacebookUrl">Sign in with Facebook</a>

After passing social authorization steps, you will be redirected on the main page of the game (window.location.origin) with token parameter in query string.

Example:

You have to set this token to the game and clear query string.

Profile

Since user is authorized, you can always get its profile by user property

If the user object is null (for example, after OAuth2 authorization), you can ask it using the getProfile method.

Init game

Starting the game, you have to make its initialization. Initialization process is required before getting any private data from the competition

Available methods

| Method | Success | Error | Description | |---------------------------------------------------------|:-------------------:|-----------------:|----------------------------------------------------------------------------:| | signUpWithEmail() | | SignUpError | Sign up the system with email, returns validation errors if something wrong | | signInWithEmail() | | SignInError | Sign in the system with email, returns validation errors if something wrong | | getProfile() | IUser | 403 | Get user profile | | getContest() | Contest | | Get contest info | | getForm() | IFormResponse | 403 | Get user form questions | | sendForm(data: IAnswerRequest) | IFormAnswerResponse | ValidationFailed | Answer the form | | getNominations() | Nomination[] | 403 | Get the list of the task categories | | getNomination(nominationId: number) | Nomination | 403 | Get category item by ID | | getRandomNomination() | Nomination | 403 | Get random category | | getTasks(nominationId: number) | Task[] | 403 | Get tasks from the category | | getRandomTask(nominationId: number) | Task | 403 | Get random task from the category | | getTask(nominationId: number, taskId: number) | Task | 403 | Get task from the category by ID | | answer(nominationId: number, taskId: number, data: any) | ISolutionResponse | 422 | Answer the task | | getLeaderboard(page: number = 1, search: string = "") | IRatingResponse | 403 | Get contest leaderboard (summary leaderboard) | | getMyGlobalScore() | IMyScoreResponse | 403 | Get the user score in contest | | getWheelTries() | IWheelSpins | 403 | only for wheel - get spins information | | setToken(token: string) | | | Set Auth token | | logout() | | | Logout the system |

Available properties

| Property | Type | Description | |-------------------|:-------:|:--------------------------------:| | signInGoogleUrl | string | The URL to sign in with Google | | signInFacebookUrl | string | The URL to sign in with Facebook | | authorized | boolean | Determines if the user is login | | user | User | Auth user instance |

Types

User

Contest

Form

IQuestion

AnswerRequest

Answer

Nomination

Task

SolutionResponse

Solution

IRatingResponse

IRatingPosition

IMyScoreResponse

IWheelSpins