Code Monkey home page Code Monkey logo

stalks.js's Introduction


A library/module to interact with the stalks.io API.

npm GitHub GitHub Workflow Status

What's this?

If you play animal crossing, especially the new horizons you may have the seen the character Daisy Mae. She sells you turnips which you can later sell. To improve your results you may want to track the prices. That caused the website stalks.io. It allows you to track the prices and show you a predicition.

If you happen to be patron of this at level 2 you can use the api to interact with the page. This library/module allows you to easily interact with the api via node or deno.

Documentaion

You find a full documentation over here.

Installation

If you want to use node you just need to install it via:

$ npm install stalks.js

Loading the library/modules

For node:

import StalksClient from "stalks.js";

You can't use require. stalks.js is a pure ES Module. You still can use the dynamic import().

For deno:

import StalksClient from "https://raw.githubusercontent.com/cptpiepmatz/stalks.js/master/mod.ts";

Usage

Some basic usage for this.

const client = new StalksClient(YOUR_API_TOKEN);
const stalks = client.stalks;
const accounts = client.accounts;

stalks.fetchWeek()
  .then(console.log)
  .catch(console.error);
  
accounts.fetchCurrentUser()
  .then(console.log)
  .catch(console.error);

Getting an API token

  1. Become a patron.
    1. Go to stalks.io patron page.
    2. Choose at least "Blathers".
  2. Go to stalks.io settings.
  3. Click on "API Access".
  4. There you go. You have your token. (You may need to regenerate one.)

Examples

You can find examples here.

stalks.js's People

Contributors

cptpiepmatz avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.