pub_client 2.0.0

  • README.md
  • Installing
  • Versions
  • 67

Build Status Pub

pub_client

A library for interacting with the REST API for Pub (pub.dartlang.org/api). This package currently uses Dartson to decode the JSON responses from Pub into concrete types.

Supported API Calls

  • getPageOfPackages(pageNumber) - Retrieves a single page of packages from Pub with the most recently updated packages first.
  • getAllPackages() - Retrieves all possible pages of packages. NOTE: This method has the potential to generate a lot of network traffic.
  • getPackage(packageName) - Retrieves a single package by it's name.

Example Usage

import "package:pub_client/pub_client.dart";

main() async {
    PubClient client = new PubClient();
    FullPackage package = await client.getPackage("test");
    print(package.latest.version);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  pub_client: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:pub_client/pub_client.dart';
  
Version Uploaded Documentation Archive
2.0.0 Aug 9, 2018 Go to the documentation of pub_client 2.0.0 Download pub_client 2.0.0 archive
1.0.8 Jul 23, 2015 Go to the documentation of pub_client 1.0.8 Download pub_client 1.0.8 archive
1.0.7 Jun 10, 2015 Go to the documentation of pub_client 1.0.7 Download pub_client 1.0.7 archive
1.0.5 Apr 16, 2015 Go to the documentation of pub_client 1.0.5 Download pub_client 1.0.5 archive
1.0.4 Apr 16, 2015 Go to the documentation of pub_client 1.0.4 Download pub_client 1.0.4 archive
1.0.3 Apr 16, 2015 Go to the documentation of pub_client 1.0.3 Download pub_client 1.0.3 archive
1.0.2 Apr 15, 2015 Go to the documentation of pub_client 1.0.2 Download pub_client 1.0.2 archive
1.0.1 Apr 15, 2015 Go to the documentation of pub_client 1.0.1 Download pub_client 1.0.1 archive
1.0.0 Apr 15, 2015 Go to the documentation of pub_client 1.0.0 Download pub_client 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
43
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:pub_client/pub_client.dart.

Issues and suggestions

Maintain CHANGELOG.md.

Changelog entries help clients to follow the progress in your code.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use pub_client.dart.

Format lib/pub_client.dart.

Run dartfmt to format lib/pub_client.dart.

Format lib/src/models.dart.

Run dartfmt to format lib/src/models.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http ^0.11.3+17 0.11.3+17
json_annotation ^1.0.0 1.1.0
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
path 1.6.2
source_span 1.4.1
string_scanner 1.0.3
typed_data 1.1.6
Dev dependencies
build_runner ^0.10.1
json_serializable ^1.0.1
test any