Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{model}} ? #21

Closed
belham opened this issue Jul 23, 2013 · 3 comments
Closed

{{model}} ? #21

belham opened this issue Jul 23, 2013 · 3 comments
Labels

Comments

@belham
Copy link

belham commented Jul 23, 2013

Hey! Is it possible to have a list of all the things one can request from {{model}} (in particular how to request the post date of the image :) )
Thanks!

@stevenschobert
Copy link
Owner

The {{model}} is just the image object returned by the Instagram API, so it will have any & all values the API returns.

You can get the timestamp of an image by using {{model.created_time}}. Be aware though, this is just a timestamp, not a human-friendly data/time string.


Here is an example of everything inside the model object (as of July 23, 2013):

{
  "attribution": null,
  "tags": [
    "vscocam"
  ],
  "type": "image",
  "location": {
    "latitude": 32.784666667,
    "longitude": -96.8085
  },
  "comments": {
    "count": 1,
    "data": [
      {
        "created_time": "1372728780",
        "text": "\ud83d\udc4d\ud83d\udc4d\ud83d\udc4d\ud83d\udc4d\ud83d\udc4d",
        "from": {
          "username": "hanifzman",
          "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_307235574_75sq_1372653683.jpg",
          "id": "307235574",
          "full_name": "Hanif Azman"
        },
        "id": "490807041032566604"
      }
    ]
  },
  "filter": "Normal",
  "created_time": "1372728575",
  "link": "http:\/\/instagram.com\/p\/bPsNZFAbTr\/",
  "likes": {
    "count": 10,
    "data": [
      {
        "username": "callmedalty",
        "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_14160986_75sq_1372114022.jpg",
        "id": "14160986",
        "full_name": "Dalton Jones"
      },
      {
        "username": "micah_medlock",
        "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_370290197_75sq_1371610876.jpg",
        "id": "370290197",
        "full_name": "Micah medlock"
      },
      {
        "username": "hanifzman",
        "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_307235574_75sq_1372653683.jpg",
        "id": "307235574",
        "full_name": "Hanif Azman"
      },
      {
        "username": "marcusquirino",
        "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_369780805_75sq_1368499406.jpg",
        "id": "369780805",
        "full_name": "Marcus Quirino Fernandez"
      }
    ]
  },
  "images": {
    "low_resolution": {
      "url": "http:\/\/distilleryimage11.s3.amazonaws.com\/da687d12e2b611e2b20722000a1f97fa_6.jpg",
      "width": 306,
      "height": 306
    },
    "thumbnail": {
      "url": "http:\/\/distilleryimage11.s3.amazonaws.com\/da687d12e2b611e2b20722000a1f97fa_5.jpg",
      "width": 150,
      "height": 150
    },
    "standard_resolution": {
      "url": "http:\/\/distilleryimage11.s3.amazonaws.com\/da687d12e2b611e2b20722000a1f97fa_7.jpg",
      "width": 612,
      "height": 612
    }
  },
  "users_in_photo": [
    {
      "position": {
        "y": 0.686274529,
        "x": 0.648692787
      },
      "user": {
        "username": "langly",
        "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_29822655_75sq_1365617490.jpg",
        "id": "29822655",
        "full_name": "Langly Bags"
      }
    }
  ],
  "caption": {
    "created_time": "1372728587",
    "text": "Vroom. #vscocam",
    "from": {
      "username": "stevenschobert",
      "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_4385108_75sq_1368483762.jpg",
      "id": "4385108",
      "full_name": "Steven Schobert"
    },
    "id": "490805427114718952"
  },
  "user_has_liked": false,
  "id": "490805318733903083_4385108",
  "user": {
    "username": "stevenschobert",
    "website": "",
    "profile_picture": "http:\/\/images.ak.instagram.com\/profiles\/profile_4385108_75sq_1368483762.jpg",
    "full_name": "Steven Schobert",
    "bio": "",
    "id": "4385108"
  }
}

@belham
Copy link
Author

belham commented Jul 23, 2013

Awesome, thanks ever so much for the fast reply and all!
ps. gj with instafeed.js, I'm considering making a module available for drupal that implements it if I can find the time. :)

@belham belham closed this as completed Jul 23, 2013
@stevenschobert
Copy link
Owner

@belham Awesome! Let me know if I can help out any way, and if you get around to that module then let me know and I'll mention it in the repo 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants