dadapush_client 1.0.0

dadapush_client #

DaDaPush: Real-time Notifications App

Send real-time notifications through our API without coding and maintaining your own app for iOS or Android devices.

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Build package: org.openapitools.codegen.languages.DartClientCodegen For more information, please visit https://www.dadapush.com

Requirements #

Dart 1.20.0 or later OR Flutter 0.0.20 or later

Installation & Usage

Github #

If this Dart package is published to Github, please include the following in pubspec.yaml

name: dadapush_client
version: 1.0.0
description: DaDaPush Client For Dart
dependencies:
  dadapush_client:
    git: https://github.com/dadapush/dadapush-dart-client.git
      version: 'any'

Local #

To use the package in your local drive, please include the following in pubspec.yaml

dependencies:
  dadapush_client:
    path: /path/to/dadapush_client

Tests #

TODO

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:dadapush_client/api.dart';


var api_instance = new DaDaPushMessageApi();
var body = new MessagePushRequest(); // MessagePushRequest | body
var channelToken = channelToken_example; // String | see: https://www.dadapush.com/channel/list

try {
    var result = api_instance.createMessage(body, channelToken);
    print(result);
} catch (e) {
    print("Exception when calling DaDaPushMessageApi->createMessage: $e\n");
}

run test #

pub run test -p "chrome" -n 'test createMessage'
pub run test -p "chrome" -n 'test deleteMessage'
pub run test -p "chrome" -n 'test getMessageOne'
pub run test -p "chrome" -n 'test getMessageList'

Documentation for API Endpoints #

All URIs are relative to https://www.dadapush.com

ClassMethodHTTP requestDescription
DaDaPushMessageApicreateMessagePOST /api/v1/messagepush Message to a Channel
DaDaPushMessageApideleteMessageDELETE /api/v1/message/{messageId}delete a Channel Message
DaDaPushMessageApigetMessageGET /api/v1/message/{messageId}get a Channel Message
DaDaPushMessageApigetMessagesGET /api/v1/messagesget Message List

Documentation For Models #

Author #

contacts@dadapush.com

Use this package as a library

1. Depend on it

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


dependencies:
  dadapush_client: ^1.0.0

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:dadapush_client/api.dart';
import 'package:dadapush_client/api/dadapush_message_api.dart';
import 'package:dadapush_client/api_client.dart';
import 'package:dadapush_client/api_exception.dart';
import 'package:dadapush_client/api_helper.dart';
import 'package:dadapush_client/auth/api_key_auth.dart';
import 'package:dadapush_client/auth/authentication.dart';
import 'package:dadapush_client/auth/http_basic_auth.dart';
import 'package:dadapush_client/auth/oauth.dart';
import 'package:dadapush_client/model/action.dart';
import 'package:dadapush_client/model/message_object.dart';
import 'package:dadapush_client/model/message_push_request.dart';
import 'package:dadapush_client/model/message_push_response.dart';
import 'package:dadapush_client/model/page_response_of_message_object.dart';
import 'package:dadapush_client/model/result.dart';
import 'package:dadapush_client/model/result_of_message_object.dart';
import 'package:dadapush_client/model/result_of_message_push_response.dart';
import 'package:dadapush_client/model/result_of_page_response_of_message_object.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
32
Learn more about scoring.

We analyzed this package on Jan 19, 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/api/dadapush_message_api.dart. (-8.17 points)

Analysis of lib/api/dadapush_message_api.dart reported 17 hints, including:

line 18 col 13: Unnecessary new keyword.

line 21 col 13: Unnecessary new keyword.

line 40 col 29: Unnecessary new keyword.

line 48 col 13: Unnecessary new keyword.

line 66 col 13: Unnecessary new keyword.

Fix lib/model/message_object.dart. (-7.24 points)

Analysis of lib/model/message_object.dart reported 15 hints, including:

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 13 col 7: Don't explicitly initialize variables to null.

line 15 col 10: Don't explicitly initialize variables to null.

Fix lib/model/message_push_request.dart. (-5.36 points)

Analysis of lib/model/message_push_request.dart reported 11 hints, including:

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 8: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 46 col 7: DO use curly braces for all flow control structures.

line 48 col 7: DO use curly braces for all flow control structures.

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

Additional issues in the following files:

  • lib/model/result_of_message_object.dart (11 hints)
  • lib/model/result_of_message_push_response.dart (11 hints)
  • lib/model/result_of_page_response_of_message_object.dart (11 hints)
  • lib/model/action.dart (10 hints)
  • lib/model/result.dart (10 hints)
  • lib/model/page_response_of_message_object.dart (9 hints)
  • lib/model/message_push_response.dart (6 hints)
  • lib/api_helper.dart (1 hint)
  • lib/api_client.dart (Run dartfmt to format lib/api_client.dart.)
  • lib/api_exception.dart (Run dartfmt to format lib/api_exception.dart.)
  • lib/auth/api_key_auth.dart (Run dartfmt to format lib/auth/api_key_auth.dart.)
  • lib/auth/authentication.dart (Run dartfmt to format lib/auth/authentication.dart.)
  • lib/auth/http_basic_auth.dart (Run dartfmt to format lib/auth/http_basic_auth.dart.)
  • lib/auth/oauth.dart (Run dartfmt to format lib/auth/oauth.dart.)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

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. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and dadapush_client.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 >=2.0.0 <3.0.0
http >=0.11.1 <0.13.0 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.3.0