dwyl / dwyl/quotes

Functions to Access Quotes (Random, Tags, Author)

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elixir
Stars
347
Forks
82
PR merge metrics
No merged PRs in 30d

Description

It's all well and good having a [`quotes.json`](https://github.com/nelsonic/quotes/blob/master/quotes.json) file with a bunch of quotes.
But how are we going to _access_ those quotes from `Elixir`?!

# Story

As a person wanting to use thought-provoking quotes in my project,
I need an easy way of getting a _single_ quote to display
so that the users of my app can be inspired/motivated to get stuff done!

# Todo

+ [ ] Create an Elixir Module that has functions for returning a single quote:
+ [x] `random` - get a random quote for any author or topic `Quotes.random()`
+ [x] `random_by_tag` - get a _random_ quote by a _specific_ tag e.g: `Quotes.tag("time")`
+ [ ] `author` - get a random quote by a specific author e.g: `Quotes.author("Einstein")`
+ [x] Helpers:
+ [x] `Quotes.parse_json()` - opens `quotes.json` and parse it's contents into a List of `Map`.
+ [x] `Utils.count` - returns the count of quotes, useful in testing `Quotes.parse_json` 👍

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.