dartmagur 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 51

dartmagur Pub documentation

Imagur library for dart.

Docs #

Dartdocs #

Dartdocs

Documentation #

Dartmagur class is main point of library. For now you can initialize it only with clientId. Library don't supports POST endpoints - Work in Progress.

var dartmagur = new Dartmagur("<YOU CLIENT ID>");

From there you have few options

Get Album #

Future<Album> getAlbum(String id);
  • id - id of album

Get Galleries #

This endpoint returns list of Imagur's galleries. Results can be filtered with optional parameters.

Future<List<Gallery>> getGalleries
  ({String section: "hot", String sort: "viral", int page: 0, 
    String window: "day", bool showViral: true, bool mature: true})
  • section - Section to where search for gallery. hot | top | user. Defaults to hot
  • sort - How to sort results. viral | top | time | rising (only available with user section). Defaults to viral
  • page - page number
  • window - Change the date range of the request if the section is top. Accepted values are day | week | month | year | all. Defaults to day

Gets gallery based on given id

 Future<Gallery> getGallery(String id)
  • id - Gallery id

Get Subreddit #

Gets list of images on subreddit

 Future<List<Image>> getSubreddit(String id, {String sort: "time", int page: 0, String window: "week"})
  • id - id of subreddit
  • sort - How to sort results. viral | top | time | rising (only available with user section). Defaults to viral
  • page - page number
  • window - Change the date range of the request if the section is top. Accepted values are day | week | month | year | all. Defaults to day

Searches for Gallery with list fo keywords.

Future<List<Gallery>> searchGallery(List<String> query, {String sort: "time", String window: "all", int page: 0})
  • query - list of keywords. All keywords are automatically ORed.
  • sort - How to sort results. viral | top | time | rising (only available with user section). Defaults to viral
  • page - page number
  • window - Change the date range of the request if the section is top. Accepted values are day | week | month | year | all. Defaults to day

0.1.3 #

  • added support for image sizes

0.1.2 #

  • fixed formatting
  • added badges to README

0.1.1 #

  • added docs
  • fixed subreddit deserializing

0.1.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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


dependencies:
  dartmagur: ^0.2.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:dartmagur/dartmagur.dart';
  
Version Uploaded Documentation Archive
0.2.0 Sep 15, 2018 Go to the documentation of dartmagur 0.2.0 Download dartmagur 0.2.0 archive
0.1.3 Aug 1, 2018 Go to the documentation of dartmagur 0.1.3 Download dartmagur 0.1.3 archive
0.1.2 Jul 31, 2018 Go to the documentation of dartmagur 0.1.2 Download dartmagur 0.1.2 archive
0.1.1 Jul 31, 2018 Go to the documentation of dartmagur 0.1.1 Download dartmagur 0.1.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
23
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13+1

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/Dartmagur.dart. (-6.31 points)

Analysis of lib/src/Dartmagur.dart reported 13 hints, including:

line 14 col 50: Use = to separate a named parameter from its default value.

line 28 col 19: Use = to separate a named parameter from its default value.

line 29 col 16: Use = to separate a named parameter from its default value.

line 30 col 13: Use = to separate a named parameter from its default value.

line 31 col 18: Use = to separate a named parameter from its default value.

Fix lib/src/objects/Gallery.dart. (-0.50 points)

Analysis of lib/src/objects/Gallery.dart reported 1 hint:

line 55 col 56: Use = to separate a named parameter from its default value.

Fix lib/src/objects/Image.dart. (-0.50 points)

Analysis of lib/src/objects/Image.dart reported 1 hint:

line 119 col 56: Use = to separate a named parameter from its default value.

Fix lib/src/util/HttpWrapper.dart. (-0.50 points)

Analysis of lib/src/util/HttpWrapper.dart reported 1 hint:

line 18 col 16: Use = to separate a named parameter from its default value.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://l7ssha.pl was unreachable.

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.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and dartmagur.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
http ^0.11.3+17 0.11.3+17 0.12.0+1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
path 1.6.2
source_span 1.5.4
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6