paytm_api 0.0.2

pub package

Paytm API #

A wrapper on paytm internal APIs, reverse-engineered from the paytm app.

Usage #

  1. Generate Access token
import 'package:paytm_api/paytm_api.dart' as paytm;


var loginToken = await paytm.login('<phone number>', '<password>');
var oauthToken = await paytm.enterOTP(loginToken, '<otp>');
var accessToken = await paytm.getAccessToken(oauthToken);
  1. Use Access token for full access to account
print(await paytm.getWalletHistory(accessToken));

Thanks 🙏 #

Use this package as a library

1. Depend on it

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


dependencies:
  paytm_api: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:paytm_api/paytm_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
10
Overall:
Weighted score of the above. [more]
32
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/util.dart.

Run flutter format to format lib/util.dart.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/exceptions.dart... parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/paytm_api.dart... parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/transactions.dart... parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/history.dart... parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/util.dart... parsing /tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/auth.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/collection/collection.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/developer/developer.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/io/io.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/internal/internal.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/isolate/isolate.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/convert/convert.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/async/async.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/typed_data/typed_data.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_empty.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/math/math.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/core/core.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_http/http.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/ui/ui.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/ffi/ffi.dart... [...] parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_sink_transformer/stream_transformer_wrapper.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_sink_transformer/typed.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/result/future.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/single_subscription_transformer.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_group.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_queue.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/subscription_stream.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_splitter.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_sink_completer.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_subscription_transformer.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/stream_zip.dart... parsing /tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/async-2.4.0/lib/src/typed_stream_transformer.dart... Initialized dartdoc with 163 libraries in 28.8 seconds documenting paytm_api Generating docs for library auth from package:paytm_api/auth.dart... Generating docs for library exceptions from package:paytm_api/exceptions.dart... Generating docs for library history from package:paytm_api/history.dart... Generating docs for library paytm_api from package:paytm_api/paytm_api.dart... Generating docs for library transactions from package:paytm_api/transactions.dart... Generating docs for library util from package:paytm_api/util.dart... stderr: Documenting paytm_api... warning: private API of package:Dart is reexported by libraries in other packages: from E: (file:///flutter/bin/cache/pkg/sky_engine/lib/collection/collections.dart:11:28) referred to by collection: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: private API of package:Dart is reexported by libraries in other packages: from K: (file:///flutter/bin/cache/pkg/sky_engine/lib/collection/maps.dart:372:27) referred to by collection: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: private API of package:Dart is reexported by libraries in other packages: from V: (file:///flutter/bin/cache/pkg/sky_engine/lib/collection/maps.dart:372:30) referred to by collection: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/collection.dart) referred to by dart.pkg.collection.wrappers: (file:///tmp/pub-cache-dirDADAFM/hosted/pub.dartlang.org/collection-1.14.11/lib/wrappers.dart:7:9) warning: no canonical library found for auth.AccessToken.hashCode, not linking, from auth.AccessToken.hashCode: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart) warning: no canonical library found for auth.AccessToken.runtimeType, not linking, from auth.AccessToken.runtimeType: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart) warning: no canonical library found for auth.AccessToken.noSuchMethod, not linking, from auth.AccessToken.noSuchMethod: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart:109:20) warning: no canonical library found for auth.AccessToken.==, not linking, from auth.AccessToken.==: (file:///flutter/bin/cache/pkg/sky_engine/lib/core/object.dart:60:26) warning: paytm_api has no library level documentation comments, from paytm_api: (file:///tmp/pub-dartlang-dartdocFRRMXH/pkg/lib/paytm_api.dart:1:8) Unhandled exception: RangeError (start): Invalid value: Only valid value is 0: 1 #0 _StringBase.indexOf (dart:core-patch/string_patch.dart:336:7) #1 String.indexOf (dart:core-patch/string_patch.dart:1028:18) #2 _createLineNumbersMap (package:dartdoc/src/line_number_cache.dart:30:23) #3 LineNumberCache.lineAndColumn.

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

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

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/pycampers/paytm_api was unreachable.

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 paytm_api.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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
flutter 0.0.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
dotenv ^1.0.0
flutter_test