You are here

class InstagramMedia in Drupagram 6

Same name and namespace in other branches
  1. 7 drupagram.lib.php \InstagramMedia

Class for containing an individual Instagram posts.

Hierarchy

Expanded class hierarchy of InstagramMedia

1 string reference to 'InstagramMedia'
Instagram::fetch in ./drupagram.lib.php
Get an array of Instagram objects from an API endpoint

File

./drupagram.lib.php, line 529
Classes to implement the full Instagram API

View source
class InstagramMedia {
  public $id;
  public $user;
  public $type;
  public $images;
  public $location;
  public $comments;
  public $caption;
  public $link;
  public $likes;
  public $filter;
  public $created_time;

  /**
   * Constructor for InstagramMedia
   */
  public function __construct($values = array()) {
    $values = array_filter($values);
    foreach ($values as $key => $value) {
      switch ($key) {
        case 'user':
          $this->user = new InstagramUser($values['user']);
          break;
        default:
          $this->{$key} = $value;
          break;
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
InstagramMedia::$caption public property
InstagramMedia::$comments public property
InstagramMedia::$created_time public property
InstagramMedia::$filter public property
InstagramMedia::$id public property
InstagramMedia::$images public property
InstagramMedia::$likes public property
InstagramMedia::$link public property
InstagramMedia::$location public property
InstagramMedia::$type public property
InstagramMedia::$user public property
InstagramMedia::__construct public function Constructor for InstagramMedia