google_apps 0.1.2

Dart APIs for Google Apps Script #

This is not an official Google product. It is not supported by the Dart team.

See article for a blog post explaining how to use this package.

This package is still in an experimental state.

A library to write Google Apps Script.

This library has been written on a per-need basis. As such it is missing lots of useful functionality that I just hadn't needed yet. Until the API coverage is nearing completeness I recommend to checkout the GIT repository during development and to use this library with a path directive, adding the missing functions when they are encountered.

Consider contributing your changes back to the original repository.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.2 #

  • Run dartfmt.

0.1.1 #

  • Add link to medium article in README.

0.1.0 #

  • Add a big tournament example.
  • Add a tiny drive example.
  • Fix some linter complaints.

0.0.1+3 #

  • Fix the sheet example.

0.0.1+2 #

  • Update README (removing the example and adding the issue tracker).

0.0.1+1 #

  • Rename the example file so it's recognized by pub.dartlang.org.

0.0.1 #

  • Initial version.

example/readme.md

Google Apps Libraries #

This library wraps the existing Google Apps APIs so they can be used in Dart.

A simple example creates a new file with content "Hello from Dart":

import 'package:google_apps/drive.dart';

main() {
  DriveApp.createFile("hello.txt", "Hello from Dart");
}

This example must be compiled with the --csp flag and uploaded with apps_script_tools (https://pub.dartlang.org/packages/apps_script_tools):

`dart2js --csp -o drive.js example/drive.dart`.
apps_script_watch /tmp/drive.js drive

It can then be executed by opening the script and running the script. Since the example doesn't expose any entry point, simply running the dartPrint function is good enough.

Other examples #

There are other small examples in the "misc" directory. A big example can be found in the "tournament" directory.

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Document public APIs. (-0.06 points)

180 out of 186 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
js ^0.6.1 0.6.1+1