Skip to content

Commit

Permalink
feat: Add readme. #96
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed May 17, 2023
1 parent a604f33 commit c109b6c
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,70 @@ iex> Quotes.random_by_tag("curious")

<br />

## `Dart`

### Install from `Dart` packages

```sh
dart pub get quotesy
```

### `Dart` sample code

- Get the whole `list` of quotes.

```dart
import 'package:quotesy/quotesy.dart';
final quotesArray = await Quotes.list();
[
{
"author": "Peter Drucker",
"text": "The best way to predict your future is to create it."
}
]
```

- Get the list of quotes from a specific author.

```dart
import 'package:quotesy/quotesy.dart';
final authorQuotesArray = await Quotes.byAuthor("Peter Drucker");
[
{
"author": "Peter Drucker",
"text": "The best way to predict your future is to create it."
}
]
```

- Get a `random` quote.

```dart
import 'package:quotesy/quotesy.dart';
final randomQuote = await Quotes.random();
{
"author": "Zig Ziglar",
"text": "Positive thinking will let you do everything better than negative thinking will."
}
```

- Get a `random` quote from an author.

```dart
import 'package:quotesy/quotesy.dart';
final randomQuote = await Quotes.singleRandomByAuthor("William Shakespeare");
{
"author": "William Shakespeare",
"text": "Speak low, if you speak love."
}
```

<br />

## `JavaScript` / `Node.js`

### Install from NPM
Expand Down

0 comments on commit c109b6c

Please sign in to comment.