JSFiddle - React, Tailwind, and code Playground

by Andra Jimenez

HTML

<h3>Flickr Photo Gallery</h3>

<p> The Photo ID is:</p>
<div id="placeholder"></div>

JavaScript

//Final project FLICKR DRAFT 3


function FlickrPhoto(json) {
    this.farm = json.photos.photo[0].farm;
    this.server = json.photos.photo[0].server;
    this.id = json.photos.photo[0].id;
    this.secret = json.photos.photo[0].secret; 
}
FlickrPhoto.prototype.toString = function () {
    return "https://farm" + this.farm +".staticflickr.com/" + this.server +"/" + this.id + "_" + this.secret + ".jpg";
    
};





//https://farm4.staticflickr.com/3926/14427815703_7ff4e5660c.jpg

//https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg

//build something that will concacatinate 
//will need a for loop to go through

var FlickrPhoto = new FlickrPhoto({
         "photos": {
         "page": 1,
         "pages": 172045,
         "perpage": 12,
         "total": "2064529",
         "photo": [{
                "id": "14427815703",
                "owner": "100340878@N05",
                "secret": "7ff4e5660c",
                "server": "3926",
                "farm": 4,
                "title": "En attendant mon mod\u00e8le.",
                "ispublic": 1,
                "isfriend": 0,
                "isfamily": 0
            }, {
                "id": "14220986179",
                "owner": "21641933@N00",
                "secret": "d97cc73afe",
                "server": "2920",
                "farm": 3,
                "title": "LOM crate inspector",
                "ispublic": 1,
                "isfriend": 0,
                "isfamily": 0
            }, {
                "id": "14221029060",
                "owner": "93782583@N02",
                "secret": "0b5b48f430",
                "server": "5239",
                "farm": 6,
                "title": "Dovanojamas gyv\u016bnas",
                "ispublic": 1,
                "isfriend": 0,
                "isfamily": 0
            }, {
                "id": "14406298022",
                "owner": "21109902@N00",
                "secret": "91b6a9e6cb",
                "server": "3859",
     ...