google_apps 0.0.1+3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 69

Dart APIs for Google Apps scripts

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

This package is still in an experimental state.

A library to write Google Apps scripts.

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.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/example.dart

// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/// Compile this example with
/// `dart2js --csp -o hello.js example/hello_docs.dart`.
///
/// See [apps_script_tools](https://pub.dartlang.org/packages/apps_script_tools)
/// for a description on how to execute the generated program.

@JS()
library hello_docs;

import 'package:js/js.dart';
import 'package:google_apps/document.dart';

@JS()
external set sayHello(value);

@JS()
external set onOpen(value);

void sayHelloDart() {
  DocumentApp.getUi().alert("Hello world");
}

void onOpenDart(e) {
  DocumentApp
      .getUi()
      .createMenu("from dart")
      .addItem("say hello", "sayHello")
      .addToUi();
}

main(List<String> arguments) {
  onOpen = allowInterop(onOpenDart);
  sayHello = allowInterop(sayHelloDart);
}

Use this package as a library

1. Depend on it

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


dependencies:
  google_apps: "^0.0.1+3"

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:google_apps/google_apps.dart';
  
Version Uploaded Documentation Archive
0.0.1+3 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+3 Download google_apps 0.0.1+3 archive
0.0.1+2 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+2 Download google_apps 0.0.1+2 archive
0.0.1+1 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+1 Download google_apps 0.0.1+1 archive
0.0.1 Feb 26, 2018 Go to the documentation of google_apps 0.0.1 Download google_apps 0.0.1 archive

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
38 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
69
Learn more about scoring.

Platforms

Detected platforms: web, other

Primary library: package:google_apps/google_apps.dart with components: js.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Run dartfmt to format lib/document.dart.

    Run dartfmt to format lib/spreadsheet.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
js ^0.6.1 0.6.1