Code Monkey home page Code Monkey logo

movie-search's Introduction

Movie-Search

Quik Movie Search 🎥

By. Yousof Wakili

Description🗒

Millions of movies, explore now using the TMDB database and retrieve information about your favorite cinema.


Purpose of building this project 🤔

To build a movie app with Vanilla javascript using Asynchronous JavaScript (promises,async/await) and axios for API fetching. Below is an example of said API call:

// HTTP (GET) req to api and log results from TMDB API

const searchResults = async (result) => {
  try {
    const res = await axios.get(
      `${DOMAIN}/search/movie?query=${result}&api_key=${API_KEY}&`
    )
    const resultsList = res.data.results
    createMovies(resultsList)
  } catch (err) {
    console.log('Error: msg of', err)
  }
}

Used Regex for date formatting, passing in the date below:

// format the date using regex :)
const formatDate = (input) => {
  let date = input.match(/\d+/g),
    year = date[0].substring(2),
    month = date[1],
    day = date[2]

  return month + '/' + day + '/' + year
}

Quik Movie Search utilizes the TMDB API (https://developers.themoviedb.org/3/getting-started/introduction) to display content about each movie you search through. Error handling/rejection of each promise are handled through try/catch blocks and passing in the error if any errors occur with the API call. Axios library: for API calling.

Bootstrap for small tasks such as creating a dark and regular mode, small font changes, and CSS for the rest of the transitions, responsiveness, font styling, etc.

Quik Movie Search is deployed through surge for static sites and easy deployment.

Technologies 📟

  • HTML5

  • CSS3

  • JavaScript

  • Axios library for API calls

  • Bootstrap for creating normal/dark mode, buttons

    Technologies

Getting started

npm install - installing dependencies

open index.html

Screenshot

screenshot

movie-search's People

Contributors

ywakili18 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.