Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit lab. Did not have much time over the weekend to work on this. #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions movies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,31 @@
configure do
root = File.expand_path(File.dirname(__FILE__))
set :views, File.join(root,'views')
end
end


get '/' do
end
erb :index
end


get '/search' do
# binding.pry
search = Typhoeus.get("www.omdbapi.com", :params => {:s => params[:movie]})
result = JSON.parse(search.body)
@movies = result["Search"]

erb :search
end

get '/show/:id' do
# binding.pry
search = Typhoeus.get("www.omdbapi.com", :params => {:i => params[:id]})
@movie= JSON.parse(search.body)
erb :show
end


# <%= search = Typhoeus.get("www.omdbapi.com", :params => {:i => id}) %>
# <%= result2 = JSON.parse(search.body) %>
# <%= poster = result2["Poster"] %>
347 changes: 347 additions & 0 deletions public/css/bootstrap-theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/css/bootstrap-theme.css.map

Large diffs are not rendered by default.

Loading