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

mhbo-js

v1.0.38

Published

A JS wrapper for interacting with the MHBO API.

Readme

mhbo-js

npm version

A JS wrapper for interacting with the MHBO API via nodeJS. This library is NOT intended for browser usage as it requires an embedded secret key. This project should serve as a proof of concept for allowing third parties to interact with the MHBO api via other languages or platforms.

Usage

Since this package is currently private, mhbo developers can install this library by running:

yarn add https://github.com/mhbo/mhbo-js.git

To use the client in your nodejs project you can initialize the client and make restful requests:

const MHBOClient = require("mhbo-js")
const mhbo = MHBO(process.env.MHBO_ACCESS_KEY, process.env.MHBO_SECRET_KEY)

mhbo.homes.search().then(homes => {
  console.log(`Found ${homes.length} homes that match your search.`)
})

API SPEC

Authentication

The MHBO API utilizes an authentication schema requiring a JWT that is passed as a Bearer token:

curl https://www.mhbo.com/api/v1/mobile_homes \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"

To generate a token you must obtain a MHBO_ACCESS_KEY and MHBO_SECRET_KEY from one of our network administrators. You can use those credentials as we do in this library. You can review the source code for generating a token if you need to do so in another programming language. It is essential that a valid iat attribute is included in the payload and that HS512 encryption is used.

Communities

READ

To read communities you have added or can manage make the following request:

curl https://www.mhbo.com/api/v1/communities \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"

Which will resolve with the following output:

[
  {
    "id": 379824,
    "name": "Imperial Manor Mobile Home Park",
    "address": {
      "id": 1,
      "number_and_street": "4618 Dick Wilson Road",
      "city": "Denver",
      "state": "NC",
      "zip_code": "28037",
      "latitude": "35.542743",
      "longitude": "-80.997491",
      "created_at": "2012-10-03T16:05:21.000-07:00",
      "updated_at": "2014-09-28T19:04:08.000-07:00",
      "lot_num": "",
      "is_hidden": false,
      "county": "Lincoln"
    },
    "external_id": null,
    "source": null,
    "county": "USA",
    "county": "Lincoln",
    "description": "Imperial Manor Mobile Home Park is a manufactured mobile home community.",
    "is_published": true,
    "search_priority": null,
    "num_existing_photos": 1,
    "featured": false,
    "created_at": "2012-05-17T15:32:32.000-07:00",
    "updated_at": "2014-05-08T20:20:37.000-07:00",
  }
  ...
]

CREATE

To create a new community:

curl https://www.mhbo.com/api/v1/communities \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"
  -X POST
  -d '{"name":"MY Community", address:{}, contact:{}, ...}'

An acceptable format for the JSON body would be as follows:

{
  "name": "Imperial Manor Mobile Home Park",
  "description": "Imperial Manor Mobile Home Park is a manufactured mobile home community.",
  "external_id": "<An Optional ID Arbitrary to Your Own System>",
  "address": {
    "number_and_street": "4618 Dick Wilson Road",
    "city": "Denver",
    "state": "NC",
    "zip_code": "28037",
    "lot_num": "",
    "county": "Lincoln"
  },
  "country": "USA",
  "contact": {
    "name": "Mike Carey",
    "email": "[email protected]",
    "daytime_phone": "7045350218",
    "evening_phone": "7042816072",
    "website": "",
    "fax": null,
    "last_name": null,
    "alt_website": null
  },
  "photos": [
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_3_4.jpg",
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_5_6.jpg"
  ]
}

UPDATE

To update a community:

curl https://www.mhbo.com/api/v1/communities/<COMMUNITY_ID> \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"
  -X PUT
  -d '{"name":"MY Community", ...}'

An acceptable format for the JSON body would be as follows:

{
  "name": "Imperial Manor Mobile Home Park",
  "description": "Imperial Manor Mobile Home Park is a manufactured mobile home community.",
  "external_id": "<An Optional ID Arbitrary to Your Own System>",
  "address": {
    "number_and_street": "4618 Dick Wilson Road",
    "city": "Denver",
    "state": "NC",
    "zip_code": "28037",
    "lot_num": "",
    "county": "Lincoln"
  },
  "country": "USA",
  "contact": {
    "name": "Mike Carey",
    "email": "[email protected]",
    "daytime_phone": "7045350218",
    "evening_phone": "7042816072",
    "website": "",
    "fax": null,
    "last_name": null,
    "alt_website": null
  },
  "photos": [
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_3_4.jpg",
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_5_6.jpg"
  ]
}

Mobilehomes

READ

To read mobilehome listings you have added make the following request:

curl https://www.mhbo.com/api/v1/mobile_homes \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"

Which will resolve with the following output:

[
  {
    "address": {
      "id": 1,
      "number_and_street": "4618 Dick Wilson Road",
      "city": "Denver",
      "state": "NC",
      "zip_code": "28037",
      "latitude": "35.542743",
      "longitude": "-80.997491",
      "created_at": "2012-10-03T16:05:21.000-07:00",
      "updated_at": "2014-09-28T19:04:08.000-07:00",
      "lot_num": "",
      "is_hidden": false,
      "county": "Lincoln"
    },
    "contact": {
      "id": 1,
      "name": "Mike Carey",
      "email": "[email protected]",
      "daytime_phone": "7045350218",
      "evening_phone": "7042816072",
      "website": "",
      "created_at": "2012-12-26T08:25:45.000-08:00",
      "updated_at": "2013-04-25T11:04:01.000-07:00",
      "fax": null,
      "last_name": null,
      "alt_website": null
    },
    "num_bathrooms": 1,
    "num_bedrooms": 1,
    "manufacturer_name": "Champion",
    "asking_price": 35000,
    "rental_price": null,
    "model_type": "Double wide",
    "photos": [
      {"id": 4782, "url": "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_3_4.jpg"},
      {"id": 4785, "url": "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_5_6.jpg"}
    ],
    "url": "http://localhost:3000/mobile-home/2-4618-dick-wilson-road-denver-nc-28037-double-wide"
  },
  ...
]

CREATE

To create a new mobile home:

curl https://www.mhbo.com/api/v1/mobile_homes \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"
  -X POST
  -d '{"address":{}, "contact":{}, "num_bathrooms: 1, ...}'

An acceptable JSON body to POST a new property:

{
  "address": {
    "number_and_street": "4618 Dick Wilson Road",
    "city": "Denver",
    "state": "NC",
    "zip_code": "28037",
    "lot_num": "",
    "county": "Lincoln"
  },
  "contact": {
    "name": "Mike Carey",
    "email": "[email protected]",
    "daytime_phone": "7045350218",
    "evening_phone": "7042816072",
    "website": "",
    "fax": null,
    "last_name": null,
    "alt_website": null
  },
  "num_bathrooms": 1,
  "num_bedrooms": 1,
  "manufacturer_name": "Champion",
  "asking_price": 35000,
  "rental_price": null,
  "model_type": "Double wide",
  "photos": [
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_3_4.jpg",
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_5_6.jpg"
  ]
}

UPDATE

To update a mobile home:

curl https://www.mhbo.com/api/v1/mobile_homes/<MOBILE_HOME_ID> \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"
  -X PUT
  -d '{"name":"Mobile Home"}'

An acceptable JSON body to POST a new property:

{
  "address": {
    "number_and_street": "4618 Dick Wilson Road",
    "city": "Denver",
    "state": "NC",
    "zip_code": "28037",
    "lot_num": "",
    "county": "Lincoln"
  },
  "contact": {
    "name": "Mike Carey",
    "email": "[email protected]",
    "daytime_phone": "7045350218",
    "evening_phone": "7042816072",
    "website": "",
    "fax": null,
    "last_name": null,
    "alt_website": null
  },
  "num_bathrooms": 1,
  "num_bedrooms": 1,
  "manufacturer_name": "Champion",
  "asking_price": 35000,
  "rental_price": null,
  "model_type": "Double wide",
  "photos": [
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_3_4.jpg",
    "https://d3b9rakn43rtha.cloudfront.net/photos/images/005/049/274/large/DSC07672_5_6.jpg"
  ]
}

Leads

READ

To access all available leads in our system available to your company make the following request:

curl https://www.mhbo.com/api/v1/leads \
  -H "Authorization: Bearer <GENERATED_JWT_TOKEN>"

Which will return output in the following format:

[
  {
    "id": 676,
    "form": "Acme Leads",
    "full_name": "Merick Goldman",
    "email": "[email protected]",
    "phone_number": "+14323528961",
    "min_price": 10000,
    "max_price": 20000,
    "address": "Abilene Tx 79606",
    "latitude": "32.3560371",
    "longitude": "-99.8348146",
    "status": false,
    "mobilehome_id": null,
    "created_at": "2019-01-24T08:12:43.000-08:00",
    "updated_at": "2019-01-24T08:12:43.000-08:00",
    "customer_is_notified": false,
    "is_email_read": false,
    "is_enqueued": false
  },
  ...
]