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

hukd

v1.0.5

Published

Hot UK Deals API NodeJS client

Downloads

15

Readme

Hot UK Deals NodeJS client

Build Status

JavaScript Hot UK Deals client

You can apply for a api key here

Installation

npm install hukd

Usage

const HUKD = require('hukd');

const hukd = new HUKD('api_key');

hukd.get([options], callback)

hukd.get(function(err, data) {
    console.log(data);
}

Optionally you can specify page number (results are paginated), output format (default is JSON) and filter results

hukd.get({output: 'xml', category: 'travel'}, function(err, data) {
    console.log(data);
}

Full lists of options:

  • output - This parameter is used to determine what type of output you would like to receive in the response. Omitting this parameter will default to xml output. Currently the possible options are: json, xml
  • page - This parameter, along with the results_per_page parameter allows you to paginate your results. You pass it the page number of the page you would like to view, so for example, "2" would give you the second set of results for a given filter configuration. (Note: Only the first 1000 results of any filter will be accessible).
  • category - This parameter is used to determine what category you would like to see deals from. It uses the special "url name" for the different categories. Omitting this parameter will default to all deals. The possible options are: computers, audiovisual, entertainment, fashion, home, mobiles, travel, groceries, kids, other-deals, gaming, restaurant
  • forum - This parameter is used to determine what forum you would like to see deals from. It uses the special "url name" for the forums. Omitting this parameter will default to all deals. The possible options are: all, deals, vouchers, freebies, competitions, deal-requests, for-sale-trade, misc, and feedback
  • online_offline - This parameter allows you to filter between online and offline deals. Omitting this parameter will default to all deals. The possible values are: online, offline. - order - This parameter determines the order the deals are returned in. There are 3 possible options: new, discussed, hot
  • results_per_page - This parameter allows you to specify how many deals per request you would like returned. This value is limited to a maximum of 30 deals per request. The default is 20.
  • exclude-expired - This parameter allows you to prevent expired deals from being returned.Set to true to exclude expired deals.
const options = {
    output: 'json',
    page: 1,
    category: 'computers',
    forum: 'deals',
    online_offline: 'online',
    order: 'order',
    results_per_page: 20,
    exclude_expired: true
}

hukd.get(options, function(err, data) {
    console.log(data);
}