Instagram for MooTools 0.6

Instagram is a growing platform to quickly share pictures with your friends.
With this classes you can connect to nearly all Instagram API Endpoints just by using JavaScript.

Polaroid Camera Icon by Petter Myhr



Details

Author
Christopher Beloch
Current version
0.6
GitHub
CBeloch/Instagram-for-MooTools
Downloads
1529
Category
Request
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_:
    • Core/*
    • More/Request.JSONP
    • Instagram.Base

How to use

At first, you have to register a new client on the developer page of Instagram.
This library just requires the client id and if you use services that require authentication, also the callback url.

You have to use the Instagram.Base.js first. It's the base for all other files.
Use the other files as required.
If you just want to use the Media and Tags Endpoints, your code would look like

<script src="js/Instagram.Base.js"></script>
<script src="js/Instagram.Media.js"></script>
<script src="js/Instagram.Tags.js"></script>

Initialize

Syntax:

var myInstagram = new Instagram(options);

Arguments:
1. options - (options) see below

Options:

  • client_id - (string) Your applications client_id
  • redirect_uri - (string) The defined callback URL of your application
  • scope - (array) A list of scopes your application require - Take a look at the Instagram API description

Media

Media API Endpoints Documentation

getMedia

Syntax:

myInstagram.getMedia(media_id);

Arguments:
1. media_id

Events
mediaInformation

searchMedia

Syntax:

myInstagram.searchMedia(lat, lng, distance, min_time, max_time);

Arguments: 1. lat - Latitude of the center search coordinate. If used, lng is required.
2. lng - Longitude of the center search coordinate. If used, lat is required.
3. distance - Default is 1km (distance=1000), max distance is 5km
4. min_time - A unix timestamp. All media returned will be taken later than this timestamp.
5. max_time - A unix timestamp. All media returned will be taken earlier than this timestamp.

Events
mediaData

getPopularMedia

Syntax:

myInstagram.getPopularMedia();

Events
mediaData

Tags

Tag API Endpoints Documentation

getTagInformation

Syntax:

myInstagram.getTagInformation(tag);

Arguments:
1. tag - (string)

Events
tagInformation

getTagMedia

Syntax:

myInstagram.getTagMedia(tag);

Arguments:
1. tag - (string)

Events
mediaData

searchTag

Syntax:

myInstagram.searchTag(input);

Arguments:
1. input - (string)

Events
tagSearch

User

This Endpoints require and authorized user.
User API Endpoints Documentation

getUser

getFeed

getUserMedia

searchTag

getLikedMedia

searchUser

Relationship

This Endpoints require and authorized user.
Relationship API Endpoints Documentation

getFollows

getFollowedBy

getRequestedBy

getRelationship

Comment

This Endpoints require and authorized user.
Comment API Endpoints Documentation

getComments

Like

This Endpoints require and authorized user.
Like API Endpoints Documentation

getLikes

Location

Location API Endpoints Documentation

getLocation

getLocationMedia

searchLocation


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus