BrewApiClient class

Optional HTTP API client for the formulae.brew.sh catalog.

This is a standalone utility, not wired into the main Brew facade. It is useful for catalog browsing UIs where brew may not be installed.

Import separately:

import 'package:brew_dart/remote.dart';

Caveats:

  • Static files with no versioning — schema can change without warning
  • Read-only: no local state, no installed packages, no mutations
  • Data may lag behind what brew sees locally
  • Use for browsing/discovery only, not as a source of truth

Constructors

BrewApiClient({required HttpGetFn httpGet})
Creates a BrewApiClient with the given HTTP GET function.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allCasks() Future<List<CaskSummary>>
Fetch all cask summaries.
allFormulae() Future<List<FormulaSummary>>
Fetch all formulae summaries.
cask(String name) Future<CaskDetail>
Fetch detailed info for a single cask.
formula(String name) Future<FormulaDetail>
Fetch detailed info for a single formula.
installAnalytics({int days = 30}) Future<AnalyticsData>
Fetch install-on-request analytics.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

baseUrl → const String
Base URL for the Homebrew formulae API.