movie4mi_symbol Movie4Mi
API Usage
The Movie4Mi application program interface (API) is a free and easy to use system for web developers to make their site more engaging and informative for their users. Using this API, Movie4Mi ratings can easily be integrated into a web based application.

Using this API, web developers can:
  1. Find Movie IDs for movies based on their movie titles
  2. Calculate a rating for a particular movie for a particular user based on the Movie ID and the Facebook UserID Or Google UserID
  3. Show this rating dynamically loaded on a web page

There are two operations (named-key) supported by the API. Responses are returned via the standard JSON format. Using Http GET request via Javascript XMLHttpRequest, PHP cURL and others are acceptable methods to query the API

1) Get the Movie ID:
http://www.movie4mi.net/api/bin/v1/?func=movieid&title={movie-title}
This calls Movie4Mi to find the Movie ID from the database based on the movie title. Movies can be added to the database but only from the Movie4Mi website.
  • {movie-title} = URL encoded complete movie title including subtitle (if any) and year (Case insensitive)
    • Format must be Movie Name: Subtitle (Year)
  • Example Usage:
    http://www.movie4mi.net/api/bin/v1/?func=movieid&title=Spider-man+(2002)
  • Possible Responses (JSON encoded)
    • Success Example
      {
      "status" : "success",
      "movieid" : "9341"
      }
    • Movie Not Found
      {
      "status" : "error",
      "message" : "Movie Not Found"
      }
    • Unexpected Error
      {
      "status" : "error",
      "message" : "Unexpected Error"
      }


2) Calculate the Movie Rating:
www.movie4mi.net/api/bin/v1/?func=rating&user={user-id}&usertype={client}&movieid={movie-id}
This calls Movie4Mi to calculcate the user's unique rating for the movie based on the Movie ID and Facebook ID. It is best to call this operation asynchronously with the program flow.
  • {user-id} = The unique numeric ID associated with the user's account. It can either be a Facebook or Google account that must be specified in the usertype field otherwise the default is Facebook. This number must be retrieved by the requesting website via those respective APIs before calling this operation.
  • {client} = This value can either be "facebook" or "google" depending on what type of user the requesting website is targeting.
  • {movie-id} = The unique numeric ID associated with the movie. This can be retrieved by operation one first.
  • Example Usage:
    http://www.movie4mi.net/api/bin/v1/?
    func=rating&user=23409805253&usertype=google&movieid=435
  • Possible Responses (JSON encoded)
    • Success Example
      {
      "status" : "success",
      "rating" : "96"
      }
    • Movie Not Found
      {
      "status" : "error",
      "message" : "Movie Not Found"
      }
    • User Not Found
      {
      "status" : "error",
      "message" : "User Not Found"
      }
    • No Rating Available
      {
      "status" : "error",
      "message" : "Not Enough Movie Data For Rating"
      }
    • Unexpected Error
      {
      "status" : "error",
      "message" : "Unexpected Error"
      }
Site Integration
Generally speaking, there is no one way to integrate Movie4Mi ratings into a website, however we do require web developers to use our branded logo when requesting ratings from the Movie4Mi API and displaying them to users.

You can download a high resolution version of this logo here. Download(png)
Example Usage
exampleuse
FAQ
How do I get my user's Facebook ID?
To get your users Facebook IDs, you must first register your web application as an App on Facebook. Once you do that and your users have logged into your site via Facebook, you will be able to automatically query Facebook to obtain the Facebook user ID via Javascript, PHP and other methods. Please visit the official Facebook Developers Guide for more information.

How do I get my user's Google ID?
Similarly to obtaining the Facebook ID, you must first register your web application as an App on the Google Developers Console. Once you do that and your users have logged into your site via Google Login, you will be able to automatically query Google to obtain the Google user ID via Javascript, PHP and other methods. Please visit the official Google Sign-In Developers Guide for more information.
©2016 Dawkins Creations - Home - Terms