GithubHelp home page GithubHelp logo

hd-stagram's Introduction

hd-stagram

A simple AngularJS module for Instagram that allows you to drop directives onto your app and poll the Instagram API.

Requirements

  • Latest build of AngularJS
  • An Instagram Developers client ID (Sign up for one here)

Usage

1. Include script files

Add the appropriate script tags to AngularJS and hd-stagram.js files

<script src='/path/to/angular'></script>
<script src='/path/to/hdStagram.js'></script>

2. Add the angular module

Include the haideeStagram module into the injection point for your Angular application.

<script>
  angular.module('myApp', ['someModule','haideeStagram']);
</script>

3. Add the configuration for the provider

Using the config block in Angular, add your client ID that you received from the Instagram Developer setup.

<script>
  angular.module('myApp', ['someModule','haideeStagram']).config(["InstagramClientIDProvider", function(InstagramClientIDProvider){
    InstagramClientIDProvider.setID('YOUR CLIENT ID');
  }]);
</script>

4. Add the hd-stagram directive

In your app, add the directive to the page with appropriate attributes. See options below for setup.

<hd-stagram photo-id='q0Ci_OOWsi'></hd-stagram>

Attribute Options

  • photo-id="SHORTCODE": Exact shortcode id of image you want to display. This can be found when visiting the image's url on Instagram site.
  • tag-name="TAG": A single tag that will bring back recent images tagged with phrase
  • size="thumb|(medium)|large": Ability to set the size of image to be used based on available sizes from Instagram. If not included as an attribute, medium size is default.
  • `link="something.com|image": Override the link of the instagram image to something else. Use keyword image to signify if you want to link directly to the image source. This is useful for lightboxes or gallery images.

To Do

  • Ability to get images for a given user
  • Create methods for preventing non-attributes passed in that could cause errors

hd-stagram's People

Stargazers

Dave Ghijben avatar  avatar

Watchers

Chris Sloan avatar James Cloos 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.