You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

buildinglink

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buildinglink

A TypeScript client for interacting with the BuildingLink system, handling various authentication flows and redirects.

1.3.7
latest
Source
npmnpm
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

This is an unofficial TypeScript client for logging into and scraping BuildingLink content.

🚀 Getting Started

Install the package using your favorite package manager.

# Using npm
npm install buildinglink

🎮 Usage

This client is essentially a wrapper around the native fetch API, which does an auto-login as needed and stores session cookies for you.

import { BuildingLink } from "buildinglink";

const client = new BuildingLink({
  username: "buildinglink_username",
  password: "buildinglink_password",
});

// Get Deliveries
const url = "https://www.buildinglink.com/V2/Tenant/Deliveries/Deliveries.aspx";
const response = await client.fetch(url);

// Shorthand for tenant pages
const response = await client.page("Deliveries/Deliveries.aspx");

📦 Available Modules

ModuleMethodDescription
LibrarygetLibrary()Access documents from the BuildingLink Library
AnnouncementsgetAnnouncements()Access announcements from the BuildingLink
EventsgetEvents(from: Date, to: Date)Access events from the BuildingLink Calendar
OccupantgetOccupant()Access the current occupant's profile
BuildingsgetBuildings()Access buildings associated with the BuildingLink account
UsergetUser()Access the current user signed into BuildingLink
VendorsgetVendors()Access preferred vendors from the BuildingLink
DeliveriesgetDeliveries()Access deliveries from the BuildingLink

📝 Scraping HTML

Since it's likely you'll be using this client for scraping, the response also includes a parsed version of the HTML document using node-html-parser. You can access it on html responses from the document property.

const { document } = await client.page("Deliveries/Deliveries.aspx");

document.querySelectorAll(".delivery-item").forEach((item) => {
  const deliveryId = item.getAttribute("data-delivery-id");
  const deliveryDate = item.querySelector(".delivery-date")?.textContent;
  console.log(`Delivery ID: ${deliveryId}, Date: ${deliveryDate}`);
});

🧪 Testing

# Run tests
pnpm test

# Watch mode for development
pnpm test:watch

# Get that sweet, sweet coverage report
pnpm test:coverage

🤝 Contributing

Found a bug? Want to add a feature? We'd love your help!

  • Fork it
  • Create your feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add some amazingness')
  • Push to the branch (git push origin feature/amazing-feature)
  • Open a Pull Request

📝 License

MIT - Because sharing is caring! See LICENSE for more details.

⭐️ Show Your Support

If this package helped you automate your BuildingLink tasks, give it a star!

Made with ❤️ and ☕️ by a human who got tired of clicking through BuildingLink manually.

Keywords

buildinglink

FAQs

Package last updated on 25 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts