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

wurflcloud

v1.0.2

Published

ScientiaMobile WURFL Cloud Client for Node.js

Downloads

28

Readme

ScientiaMobile WURFL Cloud Client for Node.js

The WURFL Cloud Service by ScientiaMobile, Inc., is a cloud-based mobile device detection service that can quickly and accurately detect over 500 capabilities of visiting devices. It can differentiate between portable mobile devices, desktop devices, SmartTVs and any other types of devices that have a web browser.

This is the Node.js Client for accessing the WURFL Cloud Service, and it requires a free or paid WURFL Cloud account from ScientiaMobile: http://www.scientiamobile.com/cloud

Installation


Requirements

  • Node.JS version 0.8.2

Sign up for WURFL Cloud

First, you must go to http://www.scientiamobile.com/cloud and signup for a free or paid WURFL Cloud account (see above). When you've finished creating your account, and have selected the WURFL Capabilities that you would like to use, you must copy your API Key, as it will be needed in the Client.

Installation

Via npm:

$ npm install wurflcloud

Via Source:

Download the source code and include the following lines in your code:

var wurfl_cloud_client = require("./NodeWurflCloudClient/WurflCloudClient");
var config = require("./NodeWurflCloudClient/Config");

Configuration

Set your API Key:

var api_key = "XXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
var configuration = new config.WurflCloudConfig(api_key);

Example

After you have installed and configured the WURFL Client, create example.js:

var brand;
var result_capabilities = {};
var WURFLCloudClientObject = new wurfl_cloud_client.WurflCloudClient(configuration, HttpRequest, HttpResponse);
WURFLCloudClientObject.detectDevice(HttpRequest, null, function(err, result_capabilities){
	WURFLCloudClientObject.getDeviceCapability('brand_name', function(error, brand){
		if(error!=null){
			console.log('Error' + error);
		}else{
			console.log('Brand name: ' + brand);
		}
	});
});				

You should see the brand name of your device in the console provided that you have already obtained a WURFL Cloud API key and that you have selected brand_name in your capabilities section.

Example application

After you have registered in WURFL Cloud Service here, to run the example application on you browser do the following:

  • Download and extract all the files in a folder.
  • Inside the exampleApp.js enter your own WURFL Cloud api key.
  • Select brand_name and is_wireless_device as your capabilities in ScientiaMobile WURFL Cloud website.
  • Run the server/example application inside a console with node index.js.
  • Go to a Web Browser in http://localhost:8888
  • Either chose example or example2.

You will see the brand name of your device and whether it is wireless or not.

2015 ScientiaMobile Incorporated

All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of ScientiaMobile Incorporated and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to ScientiaMobile Incorporated and its suppliers and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from ScientiaMobile Incorporated.