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

fleck-api

v1.0.0

Published

Interface for the Fleck API

Readme

Fleck-API

Interface for the Fleck API.

You must have an API token in order to use it. For getting one, send an email to [email protected].

How To Install:

The generated code relies on node package manager (npm) being available to resolve dependencies. Once published you can install the library by issuing the following command.

npm install fleck-api

How To Use:

The following example shows how to use the API:

// import the module
var fleck = require('fleck-api');

// set the client API token
// if you don't have one, send an email to [email protected]
fleck.apiToken = 'DF2BohjGgXJSU9A_hQrZmQPpQlLOiiTi';

// customize the request. For more info check out the options table
// in the reference section
var options = {
    size: fleck.Size.s1242,
    language: fleck.Language.ru,
    secure: fleck.Secure.yes
};

// make the request
fleck.getRelease(options,function(error, response){
    // handle error
    if (error) {
        console.log('error:',error);
        return;
    }

    // do something with the info
    var release = response.release;
    var posts = response.posts;

    options.before = release.timestamp;

    fleck.getRelease(options,function(error, response){
        // handle error
        if (error) {
            console.log('error:',error);
            return;
        }

        // do something with the info
        var release = response.release;
        var posts = response.posts;

        console.log("Release:", release);
        console.log("Posts:", posts);
    });
});

Reference:

Table of options and its valid values. In the models folder there are enums for the options to ensure valid values.

|Param | Description | Valid values | Default | |------|-------------|--------------|-----------| |before | It will return the release with a date strictly less than the number. | Integers greater than 1419084000, which is the timestamp of the first release (20th december 2015). Any previous timestamp will return a 204 HTTP Response. | current timestamp | |version | The version of the API. | 1.0 | 1.0 | |language | The topic name and location name are localized | [en,es,ru,pt_PT,pt_BR,de,fr] | en | |size | Size of the image | [212,250,414,640,750,1242] | 640 | |secure | If true, all links use https | [yes,no] | No |

####Response:

The response is parsed by the library. The following is a JSON response example:

// curl "https://api.getfleck.com/release?token=validtoken&v=1.0"
{
  "posts" :
  [
        // omitted other 19 elements
        {
          "created": 1433895797,
          "creator": {
              "avatar_url": "http://media.getfleck.com/avatars/I5dNCBwABkeK3PQX.jpg",
              "name": "Tiffany Sherwood"
          },
          "img_url": "http://media.getfleck.com/640x640/JEAuPFQABvYWNP9H.jpg",
          "location": {
              "lat": 40.7127837,
              "lon": -74.0059413,
              "name": "New York, United States"
          },
          "order": 1433955580,
          "position": 20,
          "release": {
              "number": 173,
              "timestamp": 1433955600
          },
          "topic": {
              "name": "Street Art"
          },
          "web_url": "http://getfleck.com/s/JEAuPFQABvYWNP9H"
      }
  ],
  "release": {
      "number": 173,
      "timestamp": 1433955600
  }
}

Post object

| Variable | Type | Description | |----------|------|-------------| | created | Float | Timestamp of submission with seconds precision. | | creator | Creator | User info | | img_url | String | Url of the post image with the size requested | | location | Location | Location of the post. | | order | Integer | Position of the post related to all post of Fleck. Useful to compare post from different releases to determine the absolute order | | position | Integer | Position of the post inside the release. It starts at 1. | | release | Release | Release that the post belongs to. | | topic | Topic | Topic that the post belongs to. | | web_url | String | URL of the web version of the post. |

Release object

| Variable | Type | Description | |----------|------|-------------| | number | Integer | Unique release number. Starts at 1. | | timestamp | Float | Timestamp with seconds precision at the time the release was published. |

Topic object

| Variable | Type | Description | |----------|------|-------------| | name | String | Localized name of the topic |

Location object

As of Fleck 2.1 users can optionally attach a location to a post. Currently, locations are all cities and not any more specific (all posts in the same city have the same lat/lon). If the post doesn't have a location, the response will be a location object with every property with a null value.

| Variable | Type | Description | |----------|------|-------------| | name | String | Localized name of the place | | lat | Float | Latitude of the place | | lon | Float | Longitude of the place |

Creator object

| Variable | Type | Description | |-------------|------|-------------| | avatar_url | String | URL of the avatar with a size 200x200 px | | name | String | User's name |