my_best_coffee's People
Forkers
jayk31my_best_coffee's Issues
I'd like some help on API stuff for my current user story
CONTEXT
WHAT USER STORY YOU ARE WORKING ON:
- I am working on the user story "As a user, I want to receive reliable restaurant, recipe, and kitchenware suggestions from 'my best coffee' so that I can trust that it will really be the best possible coffee."
WHAT YOU ARE TRYING TO DO:
- I am trying to introduce Amazon product info into my website.
DETAILED DESCRIPTION OF THE BUG/ERROR:
- There is no current error -- rather I would just like to touch base about the whole topic because it's been several days and I am feeling very fuzzy headed about it.
WHAT I'VE TRIED
- I am just starting this user story and want to revisit the topic of APIs.
QUESTION
- What is the best way to approach using Amazon's API for my site? How should I approach to minimize difficulty?
Both my rspec and seeds error out and my errors are about my join tables
CONTEXT
WHAT USER STORY YOU ARE WORKING ON:
- I am working on the user story "as a user i want to see a list of all the recipes on "my best coffee" so i can choose any one of them that interests me."
WHAT YOU ARE TRYING TO DO:
- I am trying to seed my database and get my rspec tests to pass.
DETAILED DESCRIPTION OF THE BUG/ERROR:
- I have been running the rspec and rake db:seeds. I get the same sort of error for each of my join tables. I currently have three join tables: "appliance_users", "appliance_steps", and "ingredients_steps". I have migrations and models for each of them.
- However when I try to seed or run rspec I get 'method_missing' errors such as the following:
NameError: undefined local variable or method `appliances_users' for #<Class:0x007fb95ee8d360>
/Users/joshuaguthals/dev/wdi/my_best_coffee/app/models/user.rb:4:in `<class:User>'*
/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined local variable or method `ingredients_steps' for #<Class:0x007f9b60946080> (NameError)
from /Users/joshuaguthals/dev/wdi/my_best_coffee/app/models/ingredient.rb:3:in `<class:Ingredient>'*
WHAT I'VE TRIED
- I have tried renaming the names of the model tables, I have tried renaming the class names, the table names ...
- Currently my join table models are called 'appliance_user', 'ingredient_step', and 'appliance_step' and my classes are ApplianceUser, IngredientStep, and ApplianceStep.
- I've read and re-read the associations descriptions in the Rails documentation and don't see what my error is.
QUESTION
- Why am I receiving these messages that there is no method with the name of my migrations for my join tables?
Your seed file is awesome!!!
I'm going to make sure everyone has a basic user and an admin user seeded in their databases.
You're sitting pretty with yours. 🌹
ERD
Your ERD should be an Entity Relationship Diagram. Try uploading a drawing.
Issue with adding a new recipe to a user's recipe box
CONTEXT
WHAT USER STORY YOU ARE WORKING ON:
I am working on the user story "As a user, I want to receive be able to add a recipe to my recipe box so I can edit it."
WHAT YOU ARE TRYING TO DO:
I am trying to correctly route the request so that I don't add recipes I just wanted to view and so I only add recipes I have said I want to add.
DETAILED DESCRIPTION OF THE BUG/ERROR:
I've tried routing through 'new', 'edit', and 'show' -- it worked in show but it was adding every recipe I clicked. My efforts to differentiate between one that I want to show on page and one I want to ADD and THEN show on page just don't seem to work.
WHAT I'VE TRIED
I've tried running the request through 'show', 'edit', and 'new' routes.
QUESTION
How can I route this correctly so I only add a recipe I want to add?
Update Readme for Heroku and Pivotal
Please update your readme.md
to include links to your Pivotal Tracker and your app on Heroku.
IDs on Comments Table
Your ERD describes your comments table as have foreign keys for users, appliances, recipes, and ingredients.
What is your goal?
Does a user want to leave a comment about a recipe, about an appliance or about an ingredient?
You should use annotate, all the cool kids are doing it.
Search it up, it's gem install annotate
Usage in rails:
cd /path/to/app
annotate
Into Gemfile from rubygems.org:
gem 'annotate', ">=2.6.0"
My requests to yummly's api doesn't seem to exclude meal types as expected
WHAT USER STORY AM I WORKING ON:
"As a 'my best coffee' recipe user, I want to be able to get recommendations for a 'my best coffee' so that I can best satisfy my culinary desires in ways that I wouldn't have thought of by myself."
WHAT ARE YOU TRYING TO DO:
I am trying to pull meal-type specific recipe suggestions from Yummly's api using their specified description. Specifically I only want to pull 'beverages' and/or 'breakfast' recipes to insure that it is actually a coffee recipe. Here is their description :
excludedCourse[] : Specifying an excludedCourse[] parameter means that search results will exclude recipes with that course. This parameter must be set equal to a searchValue in the Search Metadata Dicionary and can be repeated more than once to specify more than one course.
To exclude Appetizer recipes from a search for “Onion Soup” append &excludedCourse[]=course^course-Appetizers
https://developer.yummly.com/documentation
For example:
http://api.yummly.com/v1/api/recipes?_app_id=YOUR_ID&_app_key=YOUR_APP_KEY&q=onion+soup&excludedCourse[]=course^course-Appetizers
The excludedCourse[] parameter must be set equal to a searchValue found in the Yummly Search Metadata Dictionaries. An example of an excludedCourse[] searchValue is "course^course-Appetizers" to indicate you want to exclude Appetizer recipes. To access the metadata dictionary for excludedCourse[] searchValues, use the following end point: http://api.yummly.com/v1/api/metadata/course?_app_id=YOUR_ID&_app_key=YOUR_APP_KEY
Supported Courses
Main Dishes, Desserts, Side Dishes, Lunch and Snacks, Appetizers, Salads, Breads, Breakfast and Brunch, Soups, Beverages, Condiments and Sauces, Cocktails
allowedCourse[] : Specifying an allowedCourse[] parameter means that search results will only include recipes with that course. This parameter must be set equal to a searchValue in the Search Metadata Dicionary and can be repeated more than once to specify more than one course.
To search for “Onion Soup” recipes that are Appetizers append &allowedCourse[]=course^course-Appetizers
For example: http://api.yummly.com/v1/api/recipes?_app_id=YOUR_ID&_app_key=YOUR_APP_KEY&q=onion+soup
&allowedCourse[]=course^course-Appetizers
The allowedCourse[] parameter must be set equal to a searchValue found in the Yummly Search Metadata Dictionaries. An example of an allowedCourse[] searchValue is "course^course-Appetizers" to indicate you want Appetizer recipes. To access the metadata dictionary for allowedCourse[] searchValues, use the following end point: http://api.yummly.com/v1/api/metadata/course?_app_id=YOUR_ID&_app_key=YOUR_APP_KEY
Supported Courses
Main Dishes, Desserts, Side Dishes, Lunch and Snacks, Appetizers, Salads, Breads, Breakfast and Brunch, Soups, Beverages, Condiments and Sauces, Cocktails
WHAT I'VE TRIED:
I tried the following api requests, none of which has worked
pry(main)> response = HTTParty.get("http://api.yummly.com/v1/api/recipes?_app_id=a19f88e9&_app_key=92042c4a41685498af7e7aacb8f6247d&q=coffee&maxTotalTimeInSeconds=1200&excludedIngredient[]=sugar&excludedIngredient[]=instant%20coffee&allowedCourse[]=course^course-Beverages")
This gave me the following error:
URI::InvalidURIError: bad URI(is not URI?): http://api.yummly.com/v1/api/recipes?_app_id=a19f88e9&_app_key=92042c4a41685498af7e7aacb8f6247d&q=coffee&maxTotalTimeInSeconds=1200&excludedIngredient[]=sugar&excludedIngredient[]=instant%20coffee&allowedCourse[]=course^course-Beverages
Then I tried: response = HTTParty.get("http://api.yummly.com/v1/api/recipes?_app_id=a19f88e9&_app_key=92042c4a41685498af7e7aacb8f6247d&q=coffee&maxTotalTimeInSeconds=1200&excludedIngredient[]=sugar&excludedIngredient[]=instant%20coffee&allowedCourse[]=Beverages")
This yielded a result chock full of recipes but the 'allowed course' part of the request didn't work at all (as you can see, I changed to format just to get some kind of response)
Then I tried allowing a course using their specified format:
and got this error:
URI::InvalidURIError: bad URI(is not URI?): http://api.yummly.com/v1/api/recipes?_app_id=a19f88e9&_app_key=92042c4a41685498af7e7aacb8f6247d&q=coffee&maxTotalTimeInSeconds=1200&excludedIngredient[]=sugar&excludedIngredient[]=instant%20coffee&allowedCourse[]=course^course-Beverages
Then I tried excluding course using the format that at least got me response:
This one returned recipes that still INCLUDED desserts.
QUESTION
Why is it not restricting or including my Yummly results by specific meal_type? Why is their specified format causing an error instead of giving me a result?
I wonder -- Am I misunderstanding the correct syntax to pull these? Here is their metadata on how they are naming courses ... perhaps I have something wrong in the name itself that is not following their metadata description for courses.
set_metadata('course', [{"id":"course-Main Dishes","name":"Main Dishes","type":"course","description":"Main Dishes","searchValue":"course^course-Main Dishes","localesAvailableIn":["en-US"]},{"id":"course-Desserts","name":"Desserts","type":"course","description":"Desserts","searchValue":"course^course-Desserts","localesAvailableIn":["en-US"]},{"id":"course-Side Dishes","name":"Side Dishes","type":"course","description":"Side Dishes","searchValue":"course^course-Side Dishes","localesAvailableIn":["en-US"]},{"id":"course-Lunch and Snacks","name":"Lunch and Snacks","type":"course","description":"Lunch and Snacks","searchValue":"course^course-Lunch and Snacks","localesAvailableIn":["en-US"]},{"id":"course-Appetizers","name":"Appetizers","type":"course","description":"Appetizers","searchValue":"course^course-Appetizers","localesAvailableIn":["en-US"]},{"id":"course-Salads","name":"Salads","type":"course","description":"Salads","searchValue":"course^course-Salads","localesAvailableIn":["en-US"]},{"id":"course-Breakfast and Brunch","name":"Breakfast and Brunch","type":"course","description":"Breakfast and Brunch","searchValue":"course^course-Breakfast and Brunch","localesAvailableIn":["en-US"]},{"id":"course-Breads","name":"Breads","type":"course","description":"Breads","searchValue":"course^course-Breads","localesAvailableIn":["en-US"]},{"id":"course-Soups","name":"Soups","type":"course","description":"Soups","searchValue":"course^course-Soups","localesAvailableIn":["en-US"]},{"id":"course-Beverages","name":"Beverages","type":"course","description":"Beverages","searchValue":"course^course-Beverages","localesAvailableIn":["en-US"]},{"id":"course-Condiments and Sauces","name":"Condiments and Sauces","type":"course","description":"Condiments and Sauces","searchValue":"course^course-Condiments and Sauces","localesAvailableIn":["en-US"]},{"id":"course-Cocktails","name":"Cocktails","type":"course","description":"Cocktails","searchValue":"course^course-Cocktails","localesAvailableIn":["en-US"]}]);
Have you gone through the Heroku Checklist?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.