parse 0.0.1

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

parse_dart

A Parse Server library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage

This is still WIP, API might change

  • User Authentication works
  • No query builder yet
  • LiveQuery websocket works
  • Parse Object works

TODO:

  • Documentation
  • Query builder
  • ...

A simple usage example:

import 'package:parse/parse.dart';

main() {
  var awesome = new Parse();
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version, created by Stagehand

example/parse_example.dart

import 'package:parse/parse.dart';
import 'dart:async';
import 'dart:math';
main() async {
    var parse = new Parse(new Credentials("myappID"), "http://localhost", "ws://localhost");
    print('parse: ${parse.credentials}');
    var object = parse.object("this");
    var id = await object.get('objectId');
    print(id);
    var createdAt = await object.get('createdAt');
    print(createdAt);
    var created = await object.create({
      'firstName': "john",
      'lastName': "doe"
    });
    print(created);
    object = parse.object("this");
    print(object.objectId);
    object.set("age", 10);
    object.set("country", "CA");
    var createdUser = await object.create({"name": "user2"});
    object.set("age", 20);
    var saved = await object.save({"age": 30});
    var country = await object.get("country");
    print(country);
    await object.destroy();
    Future sleep2() async {
      await new Future.delayed(const Duration(seconds: 2), () => "1");
    }
    var lq = parse.liveQuery();
    await lq.subscribe("_User");
    lq.on('create', ((object)=>print(object)));
    for (var i = 0; i < 15; i++) {
      var user = parse.user();
      var rand = new Random();
      user.set("username", "user${rand.nextInt(100)}");
      user.set("password", "password");
      user.set("email", "user${rand.nextInt(100)}@example.com");
      user.set("phone", "+15144665532");
      print(user.objectId);
      var createdUser = await user.signUp();
      print("Created: $i");
    }

}

Use this package as a library

1. Depend on it

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


dependencies:
  parse: ^0.0.1

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:parse/parse.dart';
  
Version Uploaded Documentation Archive
0.0.1 Mar 24, 2018 Go to the documentation of parse 0.0.1 Download parse 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
42
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
21
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

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