a carefully crafted collection of API endpoints to cater to and be consumed by epeolatry | FRONT END
Table of Contents
An API Integration built to bridge epeolatry | FRONT END to GoogleBooks - allowing users not only to track their literary/vocabulary journey within our app, but also to edit their Google Bookshelves, Reading Lists, etc. through our app.
- Visit us on Heroku
- If you'd prefer a more behind-the-scenes tour, run through LocalHost:3000 - starting with the steps below.
- You may want to browse the Google Books API Docs
- You will need to request an API Key
- I'd recommend both | You can do either HERE
- Fork and clone this repo
- Add Figaro to Gemfile
#epeolatry_front_end/gemfile #group :development, :test do gem 'figaro' #end
- Add your API Key
#config/application.yml API_KEY = 'ENTER YOUR API'
- Install gem packages by running
bundle
- Setup the database by running
rails db:{drop,create,migrate}
- Run
rails s
and navigate to http://localhost:3000
Below are all included endpoints, along with necessary params.
- All with append to base connector http://localhost:3000 or https://epeolatry-back-end.herokuapp.com (Heroku)
Method | URL | Detail | Params |
---|---|---|---|
GET |
/api/v1/user/books |
Reader's Books | { auth_token: 'the users auth_token from google' } |
GET |
/api/v1/book/search’ |
Book Search Results | { search: 'search words', page: 'which page of returns, defaults to first page if not passed' } |
POST |
/api/v1/user/books |
Add a Book to Reader's Library | { volume_id: book_id, auth_token: auth_token_for_user, shelf_id: ‘2, 3, or 4’ } |
DELETE |
/api/v1/user/books/:volume_id |
Remove Book From Reader's Library | { auth_token: auth_token_for_user, shelf_id: ‘2, 3, or 4’ } |
Method | URL | Detail | Params |
---|---|---|---|
GET |
/api/v1/word/search |
Word Search Results | params[:q] = <'word you want to search example - caterwaul'> |
POST |
/api/v1/user/words |
Add Word to Glossary for given Book | { word: 'word to look up and create', volume_id: book_id, user_id: user_id } |
GET |
/api/v1/user/words |
Reader's Glossary of Words | { user_id: user_id } |
- GET https://epeolatry-back-end.herokuapp.com/api/v1/user/books | params: { auth_token: 'the users auth_token from google' }
[{:id=>"PCcOMbEydAIC",
:type=>"book_and_shelf",
:attributes=>
{:title=>"Lilith's Brood",
:authors=>["Octavia E. Butler"],
:genres=>["Fiction"],
:description=>
"The complete series about an alien species that could save humanity after nuclear apocalypse—or destroy it—from “one of science fiction’s finest writers” (The New York Times). The newest stage in human evolution begins in outer space. Survivors ...",
:shelves=>["Reading now"]}},
{:id=>"ZrNzAwAAQBAJ",
:type=>"book_and_shelf",
:attributes=>
{:title=>"The Three-Body Problem",
:authors=>["Cixin Liu"],
:genres=>["Fiction"],
:description=>
"Soon to be a Netflix Original Series! “War of the Worlds for the 21st century.” – Wall Street Journal The Three-Body Problem is the first chance for English-speaking readers to experience the Hugo Award-winning phenomenon from China's most ...",
:shelves=>["Reading now"]}},
{:id=>"8thMLkahggcC",
:type=>"book_and_shelf",
:attributes=>
{:title=>"Parable of the Sower",
:authors=>["Octavia E. Butler"],
:genres=>["Fiction"],
:description=>
"A New York Times Notable Book: In 2025, with the world descending into madness and anarchy, one woman begins a fateful journey toward a better future. “A stunner.” —Flea, musician and actor, TheWall Street Journal Lauren Olamina and her family ...",
:shelves=>["Reading now", "To read"]}},
{:id=>"yrYUvgAACAAJ",
:type=>"book_and_shelf",
:attributes=>
{:title=>"All You Need Is Kill",
:authors=>["Hiroshi Sakurazaka"],
:genres=>["Fiction"],
:description=>
"When the alien Mimics invade, Keiji Kiriya is just one of many recruits shoved into a suit of battle armor called a Jacket and sent out to kill. Keiji dies on the battlefield, only to be reborn each morning to fight and die again and again. On ...",
:shelves=>["Reading now"]}},
{:id=>"inYs79gV4UQC",
:type=>"book_and_shelf",
:attributes=>
{:title=>"Snow Crash",
:authors=>["Neal Stephenson"],
:genres=>["Fiction"],
:description=>
"\"This Snow Crash thing--is it a virus, a drug, or a religion?\" Juanita shrugs. \"What's the difference?\" The only relief from the sea of logos is within the well-guarded borders of the Burbclaves. Is it any wonder that most sane folks have ...",
:shelves=>["To read"]}}]
- GET https://epeolatry-back-end.herokuapp.com/api/v1/word/search | params: { word: 'word to look up and create', volume_id: book_id, user_id: user_id }
'https://epeolatry-back-end.herokuapp.com/api/v1/word/search'
params[:word] = <'word you want to search example - caterwaul'>
{:data=>
{:id=>"caterwaul",
:type=>"word_poro",
:attributes=>
{:word=>"caterwaul",
:definition=>"Make a shrill howling or wailing noise like that of a cat.",
:phonetic=>"/ˈkædərˌwɔl/",
:phonetic_link=>"https://lex-audio.useremarkable.com/mp3/caterwaul_us_1.mp3",
:part_of_speech=>"intransitive verb",
:synonyms=>nil,
:example=>"he seems to think that singing soulfully is to whine and caterwaul tunelessly"
}
}
}
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request