- Create a new .ssh directory (if it doesn't exist) in your home directory, cd in and generate new ssh key:
$ ssh-keygen -t rsa -C "[email protected]"
- Print and copy the contents of the public key you just made:
$ ssh-keygen -t rsa -C "[email protected]"
console.log('Starting instagram..'); | |
const fetchData = (url) => { | |
return fetch(url) | |
.then(data => data.json()) | |
.then(json => { | |
if (json) { | |
return Promise.resolve(json); | |
} else { | |
return Promise.reject(Error('json is undefined!')); |
export default class Instagram { | |
constructor(base, token, container) { | |
console.log("Starting instagram..."); | |
this.social = container; | |
this.base = base; | |
this.token = token; | |
this.fetchData(`${this.base}?access_token=${this.token}`) | |
.then(data => this.changeDOM(data)); | |
.catch(error => console.log(error)); | |
} |