dartwitter 0.0.5
dartwitter: ^0.0.5

Dart native
Flutter Android iOS

A Twitter API client library for Dart developers.

A Twitter API client library for Dart developers.

Just developing, not testing 😇

Usage #

Authorization

import 'dart:io';

import 'package:dartwitter/dartwitter.dart';
import 'package:dartwitter/models.dart' as models;

void main() {
  authorize().then((token) => print(token));
}

Future<models.AccessToken> authorize() async {
  var handler = Auth1Handler('api_key', 'api_key_secret');
  var url = await handler.getAuthorizationUrl();
  print(url);
  var verifier = stdin.readLineSync();
  return await handler.getAccessToken(verifier);
}

A simple usage example:

import 'package:dartwitter/dartwitter.dart';
import 'package:dartwitter/models.dart' as models;

void main() {
  var handler = OAuth1Handler('api_key', 'api_key_secret');
  handler.accessToken =
      models.AccessToken('access_token', 'access_token_secret');

  var api = Api(handler);
  api.getUser(screenName: 'mertcandinler0').then((object) => print(object));
}

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

0
likes
70
pub points
0%
popularity

A Twitter API client library for Dart developers.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

mertdinlerin@gmail.com

License

MIT (LICENSE)

Dependencies

http, oauth1_client

More

Packages that depend on dartwitter