Constructor
new Flickr()
Connects to the Flickr API and processes the info
Methods
(static) applyArticle(data, newSection)
loops through the API data
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | passed from this.applySection() |
newSection |
Object | DOM object passed from this.applySection() |
(static) applySection(data)
Applies the DOM returned from this.createSection()
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | returned from window.jsonFlickrFeed() |
(static) createDialog(i, data, length)
Puts together the DOM for a Modal dialog
Parameters:
Name | Type | Description |
---|---|---|
i |
int | Counter, passed from this.applyArticle() |
data |
Object | Flickr data sent from this.applyArticle() |
length |
int | Flickr array length sent from this.applyArticle() |
(static) createItem() → {Object}
Creates a set of elements for a new <section>
Returns:
li -> figure -> figcaption, label -> img
- Type
- Object
(static) createSection() → {Object}
Creates a set of elements for a new <section>
Returns:
section -> details -> summary -> article -> ul
- Type
- Object
(static) fetch(url)
Sets the <script> tag for a JSONP-like, asynchronous Flickr API call
Parameters:
Name | Type | Description |
---|---|---|
url |
String | ModalCarousel.Flickr.url |
(static) handleCarouselButtons(i, length, next, prev)
Sets the Previous and Next input items for the Carousel arrows
Parameters:
Name | Type | Description |
---|---|---|
i |
int | Counter, passed from this.applyArticle() |
length |
int | item length passed from this.applyArticle() |
next |
Object | Next arrow |
prev |
Object | Previous arrow |
(static) handleClicks(i, closed, closeButton)
Sets the <dialog> background as clickable to close the Dialog
Parameters:
Name | Type | Description |
---|---|---|
i |
int | Counter, passed from this.applyArticle() |
closed |
Object | #Closed <input> item to mark "none" selected |
closeButton |
Object | (X) button in the upper right of the Dialog |
(static) sortItem(item) → {Object}
Sanitizes the data sent from window.jsonFlickrFeed()
Parameters:
Name | Type | Description |
---|---|---|
item |
int | Counter, passed from this.applyArticle() |
Returns:
sortedItem title, description & img
- Type
- Object