Skip to content

Instantly share code, notes, and snippets.

@jasonlucas907
Last active December 7, 2017 20:36
Show Gist options
  • Save jasonlucas907/bb7c5eeea65a9ab6f9e5244fc325584a to your computer and use it in GitHub Desktop.
Save jasonlucas907/bb7c5eeea65a9ab6f9e5244fc325584a to your computer and use it in GitHub Desktop.

AXIOS GET FUNCTION

npm docs

$(document).ready(function() {
  axios.get('https')
    .then(response => {
      allImages(response.data.data)
    })
    .catch(error => {
      console.log(error);
    })
  })

function allImages(data) { data.map(function(image) { let individualImage = image.images.standard_resolution.url; $('.instagram-container').append(<div class='instagram-box'> <img class='instagram-image' src=${individualImage}> </div> </div>) }) }

AXIOS SCRIPT TAG

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment