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 🙏

© 2024 – Pkg Stats / Ryan Hefner

strava-cz-sdk

v0.2.2

Published

Node.js API wrapper for strava.cz.

Downloads

3

Readme

strava-cz-sdk

Node.js API wrapper for strava.cz. This library uses the new JSON API of strava.cz.

This package is not affiliated with strava.cz in any way.

Installation

To install the package, run:

npm install strava-cz-sdk

Usage

Using auth credentials

First we need to login to strava.cz with our username, password and we need our canteeen number. You can find your canteen number on strava.cz website.

import { login } from 'strava-cz-sdk';

// login to strava.cz
const stravaAuth = await login({
    username: 'username',
    password: 'password',
    canteenNumber: 'canteenNumber'
}); // returns AuthStore object 

After we are logged in, we can use the stravaAuth object to get our orders.

import { login, getOrders } from 'strava-cz-sdk';

const stravaAuth = await login({
    username: 'username',
    password: 'password',
    canteenNumber: 'canteenNumber'
});

const orders = await getOrders(stravaAuth); // returns array of orders

To get the dispense information, we need to use the getDispense function.

import { login, getDispense } from 'strava-cz-sdk';

const stravaAuth = await login({
    username: 'username',
    password: 'password',
    canteenNumber: 'canteenNumber'
});

const dispense = await getDispense(stravaAuth); // returns dispense object

To get payment information, we need to use the getPayments function.

import { login, getPayments } from 'strava-cz-sdk';

const stravaAuth = await login({
    username: 'username',
    password: 'password',
    canteenNumber: 'canteenNumber'
});

const payments = await getPayments(stravaAuth); // returns array of payments

To get the canteen information, we need to use the getCanteenInfo function.

import { login, getCanteenInfo } from 'strava-cz-sdk';

const stravaAuth = await login({
    username: 'username',
    password: 'password',
    canteenNumber: 'canteenNumber'
});

const canteenInfo = await getCanteenInfo(stravaAuth); // returns canteen info object

Without auth credentials

If you want to get the public information about the canteen, you can use the getPublicCanteenInfo function.

import { getPublicCanteenInfo } from 'strava-cz-sdk';

const canteenInfo = await getPublicCanteenInfo('canteenNumber'); // returns canteen info object

To get the public canteen menu, you can use the getPublicMenu function.

import { getPublicMenu } from 'strava-cz-sdk';

const menu = await getPublicMenu('canteenNumber'); // returns array of menu items

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to contribute to this project. Just create a pull request and I will review it as soon as possible.