{"size": 1239, "ext": "scrbl", "max_stars_repo_path": "client.scrbl", "max_stars_repo_name": "jackfirth/package-analysis", "max_stars_repo_stars_event_min_datetime": "2019-10-12T09:24:46.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-23T07:59:51.000Z", "max_issues_repo_path": "client.scrbl", "max_issues_repo_name": "jackfirth/package-analysis", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client.scrbl", "max_forks_repo_name": "jackfirth/package-analysis", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 41.3, "max_line_length": 80, "alphanum_fraction": 0.7118644068}
#lang scribble/manual

@(require (for-label net/url
                     package-analysis
                     racket/base
                     racket/contract/base))

@title{Package Catalog Clients}

A @deftech{package catalog client}, or simply @deftech{package client}, is an
object used to connect to a package catalog. Clients encapsulate state
associated with the catalog such as caches and network connections. The @racket[
 current-package-client] parameter provides a client to all of the functions in
@racketmodname[package-analysis]. By default, this parameter is set to a client
for the official package catalog at @hyperlink["https://pkgs.racket-lang.org/"]{
 pkgs.racket-lang.org}.

@defproc[(package-client? [v any/c]) boolean?]{
 A predicate for @tech{package clients}.}

@defparam[current-package-client client package-client?
          #:value (make-package-client
                   (string->url "https://pkgs.racket-lang.org"))]{
 A parameter that defines the @tech{package client} used by @racketmodname[
 package-analysis]. By default, a client for the official package catalog is
 used.}

@defproc[(make-package-client [catalog url?]) package-client?]{
 Constructs a new @tech{package client} for @racket[catalog].}
