microsoft_graph 0.0.13

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

A library for making Microsoft Graph requests.

This package contains a set of high-level functions and classes that make it easy to consume Microsoft Graph resources. It's platform-independent, and can be used on both the command-line and the browser.

Use this package as a library #

Depend on it #

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

dependencies:
  microsoft_graph: ^0.0.13
  microsoft_graph_http: ^0.0.13

Install it #

You can install packages from the command line:

with pub:

pub get

with Flutter:

flutter packages get

Import it #

Now in your Dart code, you can use:

import 'package:microsoft_graph/microsoft_graph.dart';
import 'package:microsoft_graph_http/microsoft_graph_http.dart';

0.0.1 #

  • Initial version, created by Dmytro Glynskyi

example/microsoft_graph_example.dart

import 'package:microsoft_graph/microsoft_graph.dart';
import 'package:microsoft_graph_http/microsoft_graph_http.dart';
import 'dart:io' show Platform;

final String accessToken = Platform.environment["OAUTH_TOKEN"];
final IHttpClient httpClient = SimpleHttpClient(accessToken);

main() async {
  await for (var folderListInPage in getTaskFolders(httpClient)) {
    folderListInPage.forEach((folder) async {
      print(folder);
      await printTasksInFolders(folder);
    });
  }
}

printTasksInFolders(OutlookTaskFolder folder) async {
  final FolderId folderId = SpecificFolderId(folder.id, folder.name);
  await for (var taskListInPage in getTasks(httpClient, folderId)) {
    taskListInPage.forEach(print);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  microsoft_graph: ^0.0.13

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:microsoft_graph/microsoft_graph.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

We analyzed this package on Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/serialization/date_serializer.dart. (-1 points)

Analysis of lib/src/serialization/date_serializer.dart reported 2 hints:

line 14 col 32: Unnecessary new keyword.

line 21 col 13: Unnecessary new keyword.

Fix lib/src/api/get_attachments.dart. (-0.50 points)

Analysis of lib/src/api/get_attachments.dart reported 1 hint:

line 18 col 36: Unnecessary new keyword.

Fix lib/src/api/get_note_folders.dart. (-0.50 points)

Analysis of lib/src/api/get_note_folders.dart reported 1 hint:

line 18 col 28: Unnecessary new keyword.

Fix additional 14 files with analysis or formatting issues. (-2 points)

Additional issues in the following files:

  • lib/src/api/get_notes.dart (1 hint)
  • lib/src/api/get_task_folders.dart (1 hint)
  • lib/src/api/get_tasks.dart (1 hint)
  • lib/src/models/serializers.dart (1 hint)
  • lib/microsoft_graph.dart (Run dartfmt to format lib/microsoft_graph.dart.)
  • lib/src/core/authentication_provider.dart (Run dartfmt to format lib/src/core/authentication_provider.dart.)
  • lib/src/core/http_client.dart (Run dartfmt to format lib/src/core/http_client.dart.)
  • lib/src/core/http_header.dart (Run dartfmt to format lib/src/core/http_header.dart.)
  • lib/src/core/http_method.dart (Run dartfmt to format lib/src/core/http_method.dart.)
  • lib/src/core/http_provider.dart (Run dartfmt to format lib/src/core/http_provider.dart.)
  • lib/src/core/http_request_message.dart (Run dartfmt to format lib/src/core/http_request_message.dart.)
  • lib/src/core/http_response_message.dart (Run dartfmt to format lib/src/core/http_response_message.dart.)
  • lib/src/models/date_time_time_zone.dart (Run dartfmt to format lib/src/models/date_time_time_zone.dart.)
  • lib/src/models/outlook_task_folder.dart (Run dartfmt to format lib/src/models/outlook_task_folder.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (built_value).

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 pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
built_collection ^4.1.0 4.3.2
built_value ^6.3.2 6.8.2 7.0.8
Transitive dependencies
analyzer 0.38.5 0.39.4
analyzer_plugin 0.2.1
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.1+1
charcode 1.1.2
checked_yaml 1.0.2
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
dart_style 1.3.3
fixnum 0.10.11
front_end 0.1.27 0.1.29
glob 1.2.0
html 0.14.0+3
js 0.6.1+1
json_annotation 3.0.1
kernel 0.3.27 0.3.29
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
path 1.6.4
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.1.2+1
source_gen 0.9.4+6 0.9.4+7
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
yaml 2.2.0
Dev dependencies
build_runner ^1.2.8
built_value_generator ^6.3.2 6.8.2 7.0.8
microsoft_graph_http ^0.0.13
pedantic ^1.0.0 1.9.0
test ^1.0.0