https://github.com/danilowa/quote-master
https://github.com/danilowa/quote-master
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/danilowa/quote-master
- Owner: DaniloWA
- License: mit
- Created: 2023-04-30T19:46:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-30T20:49:44.000Z (about 3 years ago)
- Last Synced: 2025-02-02T09:30:42.051Z (over 1 year ago)
- Language: PHP
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QuoteMaster
QuoteMaster is a PHP library for generating random quotes from the [Quotable API](https://github.com/lukePeavey/quotable). It uses the GuzzleHttp library to make HTTP requests to the API and returns a formatted string with the quote content and author.
## Installation
You can install QuoteMaster using Composer:
```
composer require danilowa/quote-master
```
## Usage
To use QuoteMaster, create an instance of the `RandomQuote` class and call the `from` method with an author name:
```
php use Danilowa\QuoteMaster\RandomQuote;
$quoteGenerator = new RandomQuote();
$quote = $quoteGenerator->from('Albert Einstein');
echo $quote; // "Imagination is more important than knowledge. by Albert Einstein"
```
## License
QuoteMaster is released under the MIT License.