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

expedia

v0.0.3

Published

simple wrapper around the expedia EAN api

Downloads

5

Readme

NPM

##Expedia API Small client interface for the Expedia EAN api. Provides an interface for the following methods:

  • Hotel List Retrieve a list of hotels by location or a list of specific hotel ids
  • Hotel Information Retrive detailed information about a hotel from a hotel id
  • Room Availability Retrieve all available rooms at a specific hotel that accommodate the provided guest count and any other criteria.
  • Room Images Retrieve a list room images for a specific hotelId organized by room type
  • Payment Types Retrieves credit card types compatible current request settings
  • Book Reservation Requests a reservation for the specified room(s).
  • Itinerary Request Retrieve an existing itinerary's status and details, confirm the status of a previously requested booking, or retrieve a list of itineraries from a specified date span.
  • Cancel Reservation Cancel an existing reservation for a single room.
  • Ping Request Send a ping request to expedia API servers to determine if service is available in the event of a suspected outage or ISP issue, or to obtain EAN's Unix server time when troubleshooting issues with signature authentication.
  • Geo Functions Obtain location data such as a specific destinationId, latitude/longitude coordinates, and the number of active properties available within the location.

##Installation Install with npm:
npm install expedia

##Initialization Usage requires a Expedia Api key and CID. For development use you can use the CIN 55505. You can obtain your api key from the Expedia EAN api documentation.

 var options = {
        cid     : "YOUR CID",
        apiKey  : "YOUR EAN API KEY",
        locale  : "en_US",  // optional defaults to en_US
        currencyCode :"USD"  // optional defaults to USD
    };

var expedia = require("expedia")(options);

##Usage Expedia requires that you pass in a customer ip, unique session identifier, and browser agent. The remaining parameters are defined in the Expedia EAN api documentation. Please see the example directory for more options.

var options = {
  "customerSessionId" : "thisisauniqueID",
  "customerIpAddress" : "127.0.0.1",
  "customerUserAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko)",
  "LocationInfoRequest": {
    "locale": "en_US",
    "destinationString": "Seattle, WA"
  }
};

expedia.geoSearch(options, function(err, res){
    if(err)throw new Error(err);
    console.log(res);
});