jaguar_retrofit_gen 2.5.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new70

jaguar_http_cli

An Http Api generator inspired by Retrofit for Dart

Install

pub global activate jaguar_http_cli

Usage

A simple usage example:

pubspec.yaml

jaguar_http:
  - example/example.dart

example.yaml

library example;

part 'example.g.dart';

/// definition
@JaguarHttp(name: "Api")
abstract class ApiDefinition extends JaguarInterceptors {
  @Get("/users/:id")
  Future<JaguarResponse<User>> getUserById(@Param() String id);

  @Post("/users")
  Future<JaguarResponse<User>> postUser(@Body() User user);

  @Put("/users/:uid")
  Future<JaguarResponse<User>> updateUser(@Param(name: "uid") String userId, @Body() User user);

  @Delete("/users/:id")
  Future<JaguarResponse> deleteUser(@Param() String id);
}

run

jaguar_http build

use it

final api = new Api(new IOClient(), "http://localhost:9000", serializers: repo);

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

2.5.2

  • PathParam alias bug fix

2.2.2

  • Added AsForm, AsFormField

2.2.1

Breaking changes

  • Change extension to .jretro.dart

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_retrofit_gen: ^2.5.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:jaguar_retrofit_gen/jaguar_retrofit_gen.dart';
  
Version Uploaded Documentation Archive
2.5.2 Sep 11, 2018 Go to the documentation of jaguar_retrofit_gen 2.5.2 Download jaguar_retrofit_gen 2.5.2 archive
2.5.1 Sep 10, 2018 Go to the documentation of jaguar_retrofit_gen 2.5.1 Download jaguar_retrofit_gen 2.5.1 archive
2.4.2 Sep 7, 2018 Go to the documentation of jaguar_retrofit_gen 2.4.2 Download jaguar_retrofit_gen 2.4.2 archive
2.4.1 Sep 5, 2018 Go to the documentation of jaguar_retrofit_gen 2.4.1 Download jaguar_retrofit_gen 2.4.1 archive
2.2.2 Aug 28, 2018 Go to the documentation of jaguar_retrofit_gen 2.2.2 Download jaguar_retrofit_gen 2.2.2 archive
2.2.1 Aug 24, 2018 Go to the documentation of jaguar_retrofit_gen 2.2.1 Download jaguar_retrofit_gen 2.2.1 archive
2.2.0 Aug 24, 2018 Go to the documentation of jaguar_retrofit_gen 2.2.0 Download jaguar_retrofit_gen 2.2.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
45
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.3

Platforms

Detected platforms: other

Primary library: package:jaguar_retrofit_gen/jaguar_retrofit_gen.dart with components: io, isolate, build, mirrors.

Suggestions

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 jaguar_retrofit_gen.dart.

Format lib/parsed_info/parsed_info.dart.

Run dartfmt to format lib/parsed_info/parsed_info.dart.

Format lib/parser/parser.dart.

Run dartfmt to format lib/parser/parser.dart.

Format lib/writer/writer.dart.

Run dartfmt to format lib/writer/writer.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65 <3.0.0
analyzer ^0.32.0 0.32.5 0.33.0-alpha.0
build ^0.12.0 0.12.7+3
jaguar_resty ^2.8.4 2.8.4
jaguar_retrofit ^2.5.4 2.5.4
logging ^0.11.0 0.11.3+2
meta ^1.1.5 1.1.6
source_gen ^0.9.0 0.9.1
Transitive dependencies
args 1.5.0
async 2.0.8
auth_header 2.1.2
charcode 1.1.2
client_cookie 2.1.5
convert 2.0.2
crypto 2.0.6
csslib 0.14.5
dart_style 1.1.3
front_end 0.1.4+1 0.1.5
glob 1.1.7
html 0.13.3+3
http 0.11.3+17
http_parser 3.1.3
jaguar_serializer 2.2.2
kernel 0.3.4+1 0.3.5
package_config 1.0.5
plugin 0.2.0+3
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^0.10.0
collection ^1.14.10 1.14.11
path ^1.6.2 1.6.2
test ^1.3.0