medium_search 0.0.1 copy "medium_search: ^0.0.1" to clipboard
medium_search: ^0.0.1 copied to clipboard

Search results from medium.com.

medium_search #

Unofficial search provider for Medium.

This library provides you an easy way to get search results from Medium website.

It supports searching for:

  • posts
  • tags
  • users
  • publications

Insalling #

  • add to your pubspec.yaml:
medium_search: ^0.0.1
  • get it

dart pub get

  • import it
import 'package:medium_search/medium_search.dart';
  • initialize
var medium = Medium();

get tags: #

var tags = await medium.getTags("Hello");

for (var tag in tags) {
    print("The tag `${tag.name}` has ${tag.postCount} posts.");
}

get posts: #

var page = await medium.getPosts("hello");

for (var post in page.posts) {
    print("${post.title} => ${post.id}");
}

and you can get the next page by:

var nextPage = await page.nextPage();

or by getting specific page number:

var page = await medium.getPosts("Hello", page: 3); // which returns the 3th page for the query 'Hello'.

get users: #

var page = await medium.getUsers("ronaldo");

for (var user in page.users) {
    print("${user.name} => ${user.bio}");
}

get publications: #

var page = await medium.getPublications("Hello");

for (var public in page.users) {
    print("${public.name} => ${public.description}");
}
0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Search results from medium.com.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, json_annotation, json_serializable

More

Packages that depend on medium_search