simple_auth_generator 1.0.4

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 74

Simple Auth Generator

This is the API Generator for Simple Auth

Usage

Dart

pub run build_runner build

flutter

flutter packages pub run build_runner build

Add the following to your pubspec.yaml

dev_dependencies:
  simple_auth_generator: 
  build_runner: ^0.8.0

The Generator is not required, however it will make things magical.

@GoogleApiDeclaration("GoogleTestApi","client_id",clientSecret: "client_secret", scopes: ["TestScope", "Scope2"])
abstract class GoogleTestDefinition {
  @Get(url: "https://www.googleapis.com/oauth2/v1/userinfo?alt=json")
  Future<Response<GoogleUser>> getCurrentUserInfo();
}

will generate a new Api for you that is easy to use!

var api = new GoogleTestApi("google");
var user = await getCurrentUserInfo();

For more examples, check out the example project

Serialization

Json objects will automatically serialize if you conform to JsonSerializable

If you use the generator and you objects have the factory factory JsonSerializable.fromJson(Map<String, dynamic> json) your api calls will automatically Serialize/Deserialize

Or you can pass your own Converter to the api and handle conversion yourself. \

[1.0.3] - 08-30-2018

  • Updated dependencies

[1.0.2] - 08-30-2018

  • Updated dependencies

[1.0.1] - 07-30-2018

  • OAuth Bug fix

[0.0.1] - 07-05-2018

  • Initial release of Simple Auth

Use this package as a library

1. Depend on it

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


dependencies:
  simple_auth_generator: ^1.0.4

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:simple_auth_generator/simple_auth_generator.dart';
  
Version Uploaded Documentation Archive
1.0.4 Sep 4, 2018 Go to the documentation of simple_auth_generator 1.0.4 Download simple_auth_generator 1.0.4 archive
1.0.3 Aug 30, 2018 Go to the documentation of simple_auth_generator 1.0.3 Download simple_auth_generator 1.0.3 archive
1.0.2 Aug 30, 2018 Go to the documentation of simple_auth_generator 1.0.2 Download simple_auth_generator 1.0.2 archive
1.0.1 Jul 30, 2018 Go to the documentation of simple_auth_generator 1.0.1 Download simple_auth_generator 1.0.1 archive
1.0.0 Jul 30, 2018 Go to the documentation of simple_auth_generator 1.0.0 Download simple_auth_generator 1.0.0 archive
0.0.2 Jul 5, 2018 Go to the documentation of simple_auth_generator 0.0.2 Download simple_auth_generator 0.0.2 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
52
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]
74
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:simple_auth_generator/simple_auth_generator.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 simple_auth_generator.dart.

Format lib/src/generator.dart.

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
analyzer ^0.32.4 0.32.5 0.33.0-alpha.0
build >=0.9.0 <0.13.0 0.12.7+3
build_config ^0.3.1 0.3.1+2
code_builder ^3.0.0 3.1.3
dart_style ^1.0.10 1.1.3
logging ^0.11.0 0.11.3+2
meta ^1.1.0 1.1.6
path ^1.3.2 1.6.2
simple_auth ^1.0.4 1.0.6
source_gen >=0.8.1 <0.9.0 0.8.3+1 0.9.1
Transitive dependencies
args 1.5.0
async 2.0.8
built_collection 4.0.0
built_value 6.1.3
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.5
fixnum 0.10.8
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
json_annotation 1.1.0
kernel 0.3.4+1 0.3.5
matcher 0.12.4
package_config 1.0.5
plugin 0.2.0+3
pub_semver 1.4.2
pubspec_parse 0.1.2+2
quiver 2.0.0+1
source_span 1.4.1
stack_trace 1.9.3
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
test ^1.3.0