Zensavona / elixtagram

:camera: Instagram API client for the Elixir language (elixir-lang)

Home Page:https://hex.pm/packages/elixtagram

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user_recent_media/2 issue

wess opened this issue · comments

When I run this command with my user_id, I get the following error: Elixtagram.Model.UserSearchResult does not implement the Access behaviour

Thanks,
Wess

Hi @wess, could you provide me a bit more info (e.g. exact steps you used to reproduce this), as I can't reproduce the error locally.

Here's what I run, and what I get:

iex(1)> Elixtagram.configure("XXX", "XXX", "https://xxx.com")
iex(2)> {:ok, access_token} = Elixtagram.get_token!(code: "code_from_url_callback")
iex(3)> Elixtagram.configure(:global, access_token)
iex(4)> Elixtagram.user_recent_media(35822824, %{count: 2})
[%Elixtagram.Model.Media{attribution: nil,
  caption: %{created_time: "1492818154",
    from: %{full_name: "\x{1F31E} \x{1F31E} \x{1F31E}", id: "35822824",
      profile_picture: "https://ig-s-a-a.akamaihd.net/hphotos-ak-xfa1/t51.2885-19/14624786_1237066612981900_8171864064545259520_a.jpg",
      username: "zenm8"}, id: "17866287949122397",
    text: "\x{1F525}\x{1F525}\x{1F525} when the guac is lit \x{1F525}\x{1F525}\x{1F525}"},
  carousel_media: nil, comments: %{count: 0}, created_time: "1492818154",
  filter: "Normal", id: "1498189725558479928_35822824",
  images: %{low_resolution: %{height: 320,
      url: "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/18095254_987282881406799_4099813022975918080_n.jpg",
      width: 320},
    standard_resolution: %{height: 640,
      url: "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/18095254_987282881406799_4099813022975918080_n.jpg",
      width: 640},
    thumbnail: %{height: 150,
      url: "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e35/18095254_987282881406799_4099813022975918080_n.jpg",
      width: 150}}, likes: %{count: 30},
  link: "https://www.instagram.com/p/BTKo54eDZw47NmnlfdAdIeVbXn0iJOB1x0RQjw0/",
  location: nil, tags: [], type: "image",
  user: %{full_name: "\x{1F31E} \x{1F31E} \x{1F31E}", id: "35822824",
    profile_picture: "https://ig-s-a-a.akamaihd.net/hphotos-ak-xfa1/t51.2885-19/14624786_1237066612981900_8171864064545259520_a.jpg",
    username: "zenm8"}, users_in_photo: [], videos: nil},
 %Elixtagram.Model.Media{attribution: nil,
  caption: %{created_time: "1492324597",
    from: %{full_name: "\x{1F31E} \x{1F31E} \x{1F31E}", id: "35822824",
      profile_picture: "https://ig-s-a-a.akamaihd.net/hphotos-ak-xfa1/t51.2885-19/14624786_1237066612981900_8171864064545259520_a.jpg",
      username: "zenm8"}, id: "17884522156018677",
    text: "Good times babysitting this little homo for the weekend #dogsofinstgram #cavalierkingcharlesspaniel"},
  carousel_media: nil, comments: %{count: 0}, created_time: "1492324597",
  filter: "Normal", id: "1494049467480677063_35822824",
  images: %{low_resolution: %{height: 320,
      url: "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e15/17934286_158199784707459_234293824661225472_n.jpg",
      width: 320},
    standard_resolution: %{height: 612,
      url: "https://scontent.cdninstagram.com/t51.2885-15/e15/17934286_158199784707459_234293824661225472_n.jpg",
      width: 612},
    thumbnail: %{height: 150,
      url: "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e15/17934286_158199784707459_234293824661225472_n.jpg",
      width: 150}}, likes: %{count: 15},
  link: "https://www.instagram.com/p/BS77hMqDBrHk0XKJCRq2CPaKZLWdRnq34lcXvI0/",
  location: %{id: 213069300, latitude: -37.8167, longitude: 144.967,
    name: "Melbourne, Victoria, Australia"},
  tags: ["dogsofinstgram", "cavalierkingcharlesspaniel"], type: "video",
  user: %{full_name: "\x{1F31E} \x{1F31E} \x{1F31E}", id: "35822824",
    profile_picture: "https://ig-s-a-a.akamaihd.net/hphotos-ak-xfa1/t51.2885-19/14624786_1237066612981900_8171864064545259520_a.jpg",
    username: "zenm8"}, users_in_photo: [],
  videos: %{low_bandwidth: %{height: 480,
      url: "https://scontent.cdninstagram.com/t50.2886-16/17973366_447364472275539_361007364326817792_n.mp4",
      width: 480},
    low_resolution: %{height: 480,
      url: "https://scontent.cdninstagram.com/t50.2886-16/17973366_447364472275539_361007364326817792_n.mp4",
      width: 480},
    standard_resolution: %{height: 480,
      url: "https://scontent.cdninstagram.com/t50.2886-16/17973366_447364472275539_361007364326817792_n.mp4",
      width: 480}}}]

closing this due to inactivity / no response.