twitcasting_kit 0.0.13

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

twitcasting_kit

A Flutter package to call Twitcasting api.

Twitcasting API V2 Document

Initialize Twitcasting

Twitcasting.initialize(TwitcastingConfig(clientId, clientSecret));

Usage

final liveService = Twitcasting.getInstance().apiClient.liveService;
    
liveService.getRecommendedLives().then((lives) {
  // TODO
});

liveService.getLive(movieId).then((live) {
  // TODO
});

liveService.getNewLives().then((lives) {
  // TODO
});

[0.0.13]

  • Support tag search.
  • Support category search.
  • Support word search.

[0.0.11] - Release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:twitcasting_kit/twitcasting_kit.dart';

void main() {
  final clientId = "";
  final clientSecret = "";
  Twitcasting.initialize(TwitcastingConfig(clientId, clientSecret));
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final _liveService = Twitcasting.getInstance().apiClient.liveService;
  List<Live> lives = [];

  @override
  void initState() {
    super.initState();
    _liveService.getRecommendedLives().then((lives) {
      setState(() => this.lives = lives);
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text("Recommended List"),
        ),
        body: new ListView.builder(
          itemBuilder: (context, index) {
            final live = lives[index];
            return Container(
                margin: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
                child: Row(
                  children: <Widget>[
                    Image(
                      width: 80.0,
                      height: 45.0,
                      image: NetworkImage(live.movie.smallThumbnailUrl),
                    ),
                    Flexible(
                      child: Text(
                        "${live.movie.title}",
                        overflow: TextOverflow.ellipsis,
                      ),
                    ),
                  ],
                ));
          },
          itemCount: lives.length,
        ));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  twitcasting_kit: ^0.0.13

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:twitcasting_kit/twitcasting_kit.dart';
  
Version Uploaded Documentation Archive
0.0.13 Sep 4, 2018 Go to the documentation of twitcasting_kit 0.0.13 Download twitcasting_kit 0.0.13 archive
0.0.12 Sep 4, 2018 Go to the documentation of twitcasting_kit 0.0.12 Download twitcasting_kit 0.0.12 archive
0.0.11 Jun 17, 2018 Go to the documentation of twitcasting_kit 0.0.11 Download twitcasting_kit 0.0.11 archive
0.0.1 Jun 17, 2018 Go to the documentation of twitcasting_kit 0.0.1 Download twitcasting_kit 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
49
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
40
Overall:
Weighted score of the above. [more]
23
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6
  • Flutter: 0.11.3

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Error(s) in lib/twitcasting_kit.dart: Target of URI doesn't exist: 'package:http/http.dart'.

Health issues and suggestions

Fix lib/twitcasting_kit.dart. (-25.38 points)

Analysis of lib/twitcasting_kit.dart failed with 1 error, 1 hint:

line 6 col 8: Target of URI doesn't exist: 'package:http/http.dart'.

line 33 col 27: The value of the field '_config' isn't used.

Fix lib/src/http_client.dart. (-1.49 points)

Analysis of lib/src/http_client.dart reported 3 hints:

line 23 col 25: The method '_post' isn't used.

line 28 col 25: The method '_delete' isn't used.

line 33 col 25: The method '_put' isn't used.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Error(s) in lib/twitcasting_kit.dart: Target of URI doesn't exist: 'package:http/http.dart'.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

The description is too short. (-20 points)

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

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test