{"size": 1830, "ext": "scrbl", "max_stars_repo_path": "catalog.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": "catalog.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": "catalog.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.5909090909, "max_line_length": 80, "alphanum_fraction": 0.6726775956}
#lang scribble/manual

@(require (for-label package-analysis
                     racket/base
                     racket/set
                     rebellion/base/immutable-string
                     rebellion/base/option
                     rebellion/collection/multidict))

@title{Querying Package Catalogs}

@defproc[(get-package
          [name immutable-string?]
          [#:client client package-client? (current-package-client)])
         (option/c package-details?)]{
 Looks up the package @racket[name] using @racket[client] and returns
 information about the package, or @racket[absent] if it doesn't exist.}

@defproc[(get-all-packages
          [#:client client package-client? (current-package-client)])
         (set/c package-details?)]{
 Returns all packages in the package catalog that @racket[client] connects to.}

@defproc[(get-dependency-graph
          [#:client client package-client? (current-package-client)])
         multidict?]{
 Returns all dependency relationships in the package catalog, in the form of a
 multidict mapping package names to the names of their dependencies.}

@defproc[(get-transitive-dependencies
          [pkg immutable-string?]
          [#:client client package-client? (current-package-client)])
         (set/c immutable-string?)]{
 Queries the package catalog with @racket[client] and returns a set of all
 dependencies of @racket[pkg], including both direct and indirect dependencies.}

@defproc[(get-transitive-clients
          [pkg immutable-string?]
          [#:client client package-client? (current-package-client)])
         (set/c immutable-string?)]{
 Queries the package catalog with @racket[client] and returns a set of all
 clients of @racket[pkg] --- that is, all packages that depend @emph{on}
 @racket[pkg] --- including both direct and indirect clients.}
