bity 0.2.4

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

Bity library #

pub package

A library for communicating with the Bity API. Some calls are missing.

Examples #

Get an estimate #

  var client = Client('https://bity.com/');
  print(await client.estimate(inputCurrency: "BTC", inputAmount: 1, outputCurrency: "CHF"));
  client.close();

Create a crypto to fiat order #

In this example you want to buy 1000 CHF for Ether. How much Ether that is going to cost can be found by looking at the generated order.

  var client = Client('https://bity.com/');
  var uuid = await client.createCryptoToFiatOrder(inputCurrency: "ETH", outputCurrency: "CHF", outputAmount: 1000, outputIban: "some iban"));
  print(uuid);
  client.close();

View order #

  var client = Client('https://bity.com/');
  print(await client.getOrder("some uuid"));
  client.close();

Installing #

Add it to your pubspec.yaml:

dependencies:
  bity: any

Licence overview #

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.

Thanks #

v0.2.4

  • Fix createCryptoToFiatOrder call

v0.2.3

  • Add getOrders call

v0.2.2

  • Add IBAN validation

v0.2.1

  • Add Output class

v0.2.0

  • Add Order class

v0.1.1

  • Tidy up code base

v0.1.0

  • Initial release

example/main.dart

import 'package:bity/bity.dart';

void main() async {
  var client = Client('https://bity.com/');
  var estimate = await client.estimate(
      inputCurrency: "BTC", inputAmount: 1, outputCurrency: "CHF").timeout(const Duration(seconds: 2));
  print('1 BTC costs $estimate CHF');

  var orders = await client.getOrders();
  print('Orders: $orders');
  client.close();
}

Use this package as a library

1. Depend on it

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


dependencies:
  bity: ^0.2.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:bity/bity.dart';
  
Version Uploaded Documentation Archive
0.2.4 Mar 22, 2019 Go to the documentation of bity 0.2.4 Download bity 0.2.4 archive
0.2.3 Mar 21, 2019 Go to the documentation of bity 0.2.3 Download bity 0.2.3 archive
0.2.2 Mar 19, 2019 Go to the documentation of bity 0.2.2 Download bity 0.2.2 archive
0.2.1 Mar 19, 2019 Go to the documentation of bity 0.2.1 Download bity 0.2.1 archive
0.2.0 Mar 19, 2019 Go to the documentation of bity 0.2.0 Download bity 0.2.0 archive
0.1.1 Mar 18, 2019 Go to the documentation of bity 0.1.1 Download bity 0.1.1 archive
0.1.0 Mar 14, 2019 Go to the documentation of bity 0.1.0 Download bity 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
21
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]
60
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Primary library: package:bity/bity.dart with components: io.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+1 0.12.0+1
iban ^0.1.0 0.1.0
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
mod97 0.1.0
path 1.6.2
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
mock_web_server ^4.0.0
test ^1.3.4