GithubHelp home page GithubHelp logo

filmaffinity-rest-api's Introduction

Unofficial FilmAffinity REST API

Simple api to retrieve film data from FilmAffinity website

 

filmaffinity-logo

Disclaimer

This unnofficial api is made exclusively to suit my needs

Dependencies

Installation

Clone this repository:

$ git clone https://github.com/rafagale/filmaffinity-rest-api

Navigate to the new filmaffinity-rest-api folder and install the node dependencies.

$ npm install

Usage

Use the following command to run it or use any process manager like forever or pm2

$ node filmaffinity-api.js
Method name API endpoint HTTP method Input Output
Get film by title /api/title/{title} GET film title see below
Get film by id /api/id/{id} GET film id see below

Query by title

http://localhost:5000/api/title/el+padrino

OUTPUT

{
   "id":"809297",
   "url":"https://www.filmaffinity.com/es/film809297.html",
   "country":{
      "imgCountry":"http://www.filmaffinity.com/imgs/countries2/US.png",
      "country":"Estados Unidos"
   },
   "year":"1972",
   "thumbnail":"https://pics.filmaffinity.com/the_godfather-488102675-mtiny.jpg",
   "title":"El padrino",
   "directors":[
      {
         "name":"Francis Ford Coppola",
         "request":{
            "query":"Francis Ford Coppola",
            "type":"DIRECTOR",
            "lang":"es"
         }
      }
   ],
   "cast":[
      {
         "name":"Marlon Brando",
         "request":{
            "query":"Marlon Brando",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Al Pacino",
         "request":{
            "query":"Al Pacino",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"James Caan",
         "request":{
            "query":"James Caan",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Robert Duvall",
         "request":{
            "query":"Robert Duvall",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Diane Keaton",
         "request":{
            "query":"Diane Keaton",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"John Cazale",
         "request":{
            "query":"John Cazale",
            "type":"CAST",
            "lang":"es"
         }
      }
   ],
   "rating":"9,0",
   "votes":"170.882"
}

Query by id

http://localhost:5000/api/id/999543

OUTPUT

{
   "id":"999543",
   "url":"http://www.filmaffinity.com/es/film999543.html",
   "thumbnail":"https://pics.filmaffinity.com/navajeros-964056717-msmall.jpg",
   "year":"1980",
   "title":"Navajeros",
   "directors":[
      {
         "name":"Eloy de la Iglesia",
         "request":{
            "query":"Eloy de la Iglesia",
            "type":"DIRECTOR",
            "lang":"es"
         }
      }
   ],
   "cast":[
      {
         "name":"José Luis Manzano",
         "request":{
            "query":"José Luis Manzano",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"José Sacristán",
         "request":{
            "query":"José Sacristán",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Isela Vega",
         "request":{
            "query":"Isela Vega",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Verónica Castro",
         "request":{
            "query":"Verónica Castro",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Jaime Garza",
         "request":{
            "query":"Jaime Garza",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"Enrique San Francisco",
         "request":{
            "query":"Enrique San Francisco",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"María Martín",
         "request":{
            "query":"María Martín",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"José Manuel Cervino",
         "request":{
            "query":"José Manuel Cervino",
            "type":"CAST",
            "lang":"es"
         }
      },
      {
         "name":"José Luis Fernández 'Pirri'",
         "request":{
            "query":"José Luis Fernández 'Pirri'",
            "type":"CAST",
            "lang":"es"
         }
      }
   ],
   "country":{
      "imgCountry":"http://www.filmaffinity.com/imgs/countries2/ES.png",
      "country":"España"
   },
   "rating":"6.3",
   "votes":"4184"
}

filmaffinity-rest-api's People

Contributors

rafagale avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.