ghost 1.0.2 copy "ghost: ^1.0.2" to clipboard
ghost: ^1.0.2 copied to clipboard

outdated

Ghost CMS API client that closely follows the official implementation

example/example.dart

import 'package:ghost/ghost.dart';

/// As this package closely follows the official js implementation of the ghost api client, the js
/// client documentation (https://ghost.org/docs/content-api/javascript/) should also help you in
/// setting up the ghost dart client. All examples there can easily be adapted to dart. This example
/// was also adapted from there.
Future<void> main() async {
  final api = GhostContentAPI(
    url: 'https://demo.ghost.io',
    key: '22444f78447824223cefc48062',
    version: 'v3',
  );

  final posts = await api.posts.browse(
    limit: 5,
    include: ['tags', 'authors'],
  );

  for (final post in posts) {
    print(post.title);
  }
}
6
likes
40
pub points
55%
popularity

Publisher

verified publishervincentengel.io

Ghost CMS API client that closely follows the official implementation

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

http, json_annotation

More

Packages that depend on ghost