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

ritetag

v0.2.0

Published

Ritetag api nodejs module

Downloads

1

Readme

#Ritetag Build Status via Travis CI NPM version

Ritetag api module for nodejs

Ritetag API documentation: http://docs.ritetag.apiary.io/

This software is released under the MIT license. See LICENSE for more details

Download and Installation

From the command line

$ npm install ritetag

package.json

dependencies: {
  ...
  "ritetag": "*$version*",
  ...
}
...

Example use

var Ritetag = require('ritetag');

var rt = new Ritetag({
	clientId: 'YOUR_CONSUMER_KEY',
	clientSecret: 'YOUR_CONSUMER_SECRET',
	oauthToken: 'YOUR_OAUTH_TOKEN',
	oauthSecret: 'YOUR_OAUTH_SECRET'
});

rt.hashtagDirectory('jobs', function(error, results){
	if(error) return console.error(error);
	console.log(results);
});

Documentation

Initialize Ritetag object:

var Ritetag = require('ritetag');
var rt = new Ritetag({
	clientId: 'YOUR_CONSUMER_KEY' || process.env.RitetagClientId,
	clientSecret: 'YOUR_CONSUMER_SECRET' || process.env.RitetagClientSecret,
	oauthToken: 'YOUR_OAUTH_TOKEN' || process.env.RitetagOauthToken,
	oauthSecret: 'YOUR_OAUTH_SECRET' || process.env.RitetagOauthSecret,
	debug: false //optional
});

hashtagStats(hashtag, callback)

Returns an array of up to 10 hashtags most frequently used in tweets containing your query + returns stats on 'query hashtag' (hashtag created by adding # sign to your query).

rt.hashtagStats('jobs', function(error, results){
	...
});

trendingHashtags(query, callback)

Returns an array of up to 20 hashtags trending in the last 24 hours (hourly floating averages)

rt.trendingHashtags({green: 0, latin: 0}), function(error, results){
	...
});

influencer(hashtag, callback)

Returns an array of up to 10 influential Twitter accounts using a specific hashtag

rt.influencer('jobs'), function(error, results){
	...
});

historicalData(hashtag, callback)

Returns daily stats of a hashtag for the last 30 days (tweets, retweets, images, links, mentions etc.)

rt.historicalData('jobs'), function(error, results){
	...
});

socialMediaCoach(query, callback)

Analyzes content of a social media post and returns a tailored array of textual tips on how to improve the reach and engagement of that particular post

rt.socialMediaCoach({tweet: 'test', image: 0, networks: 'TWITTER'}), function(error, results){
	...
});

autoEnhancePost(query, callback)

Analyzes content of a social media post and returns arrays of suggested hashtags, images and final version of enhanced post

rt.autoEnhancePost({tweet: 'test', image: 0}), function(error, results){
	...
});

API v 2.0

hashtagDirectory(query, callback)

Returns an array of up to 10 hashtags most frequently used in tweets containing your query + returns stats on 'query hashtag' (hashtag created by adding # sign to your query).

rt.hashtagDirectory('jobs', function(error, results){
	if(error) return console.error(error);

	...
});

trendingHashtag(query, callback)

Where query is an object with green (boolean, optional, default: false) and onlylatin (boolean, optional, default: false) properties.

rt.trendingHashtag({green: false, onlylatin: true}, function(error, results){
	if(error) return console.error(error);

	...
});

hashtagsForURL(url, callback)

The api call doesn't work.

influencersForHashtag(hashtag, callback)

rt.influencersForHashtag('socialmedia', function(error, results){
	if(error) return console.error(error);

	...
});

historicalData(hashtag, callback)

rt.historicalData('job', function(error, results){
	if(error) return console.error(error);

	...
});

tweetGrader(query, callback)

Where query is an object with tweet (string, required), photo (boolean, required) and networks (string, required, [TWITTER,FACEBOOK]) properties.

rt.tweetGrader({tweet: 'test', photo: 'false', networks: 'TWITTER'}, function(error, results){
	if(error) return console.error(error);

	...
});