urban_api 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 45

urban-api Pub documentation

Wrapper for UrbanDictionary api to easy access to its resources.

Usage #

Library contains only one method getDefinitions(String word) to get definitions for specified word

// Get definitions for word
var res = await getDefinitions("shit");

print("Authors of definitions");
for(var i in res)
  print("== ${i.author}");

1.0.0 #

  • Initial version, created by Stagehand

example/urban_api_example.dart

import 'package:urban_api/urban_api.dart';

main() async {
  // Get definitions for word
  var res = await getDefinitions("shit");

  print("Authors of definitions");
  for (var i in res) print("== ${i.author}");
}

Use this package as a library

1. Depend on it

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


dependencies:
  urban_api: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:urban_api/urban_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
74
Overall:
Weighted score of the above. [more]
45
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/urban_api_base.dart. (-0.50 points)

Analysis of lib/src/urban_api_base.dart reported 1 hint:

line 16 col 5: DO use curly braces for all flow control structures.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-6.30 points)

The package was last published 55 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http ^0.12.0 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6