Skip to content

A library for interacting with the REST API for Pub (pub.dartlang.org).

License

Notifications You must be signed in to change notification settings

jimsimon/pub_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Pub

THIS PACKAGE IS NO LONGER MAINTAINED. SEE pub_api_client FOR AN ALTERNATIVE

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);
}

About

A library for interacting with the REST API for Pub (pub.dartlang.org).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages