Skip to content

omdb-search v0.3.0

Compare
Choose a tag to compare
@gorlandor gorlandor released this 28 Feb 15:33
· 6 commits to master since this release

omdb-search

A Polymer custom element that fetches movie, series, episode data from the
Open Movie Database (OMDb) api.

license Bower

Change Log

Version: 0.3.0

  • Update bower dependencies
  • Update box-sizing to border-box
  • Update element styles to use flex-box
  • Move url and computeUrl to the Private API
  • Add baseUrl property
  • Add reflectToAttribute prop to q, year, type, page, and apiVersion
  • Add on-error event listener; should an error occurs when loading an image, it will set the default img instead
  • Set the li tag id property to the imdbID value
  • Set the anchor tag href property to the hash imdbID value
  • Remove bootstrap dependency from demo
  • Update demo styles
  • Add github license badge
  • Add bower version badge

Demo it

https://giovanni-orlando.com/omdb-search/

Getting Started

Make a project directory for your demo and change directories into it:

$ mkdir omdb-search-demo && cd omdb-search-demo

Create an index.html

$ touch index.html

Install or Download

Install the component using bower.

$ bower install omdb-search --save

Or download the .zip file

Usage

In that index.html add the following code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>OMDb Search demo</title>
    <!-- Load the WebComponents polyfill: -->
    <script async src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.24/webcomponents-lite.js"></script>

    <!-- Import the omdb-search web component: -->
    <link rel="import" href="bower_components/omdb-search/omdb-search.html">

    <!-- Optionally, import the included omdb-search-theme stylesheet: -->
    <link rel="import" href="bower_components/omdb-search/omdb-search-theme.html">
</head>
<body>
    <!-- Use the element in your app:  -->
    <h1>Tarzan movies:</h1>
    <omdb-search q="Tarzan" type="movie" page="1"></omdb-search>
</body>
</html>

Available on customelements.io

License

Mit: https://mit-license.org/

Copyright 2017: Giovanni Orlado Rivera

Website: https://giovanni-orlando.com/