The Startup
Published in

The Startup

My iOS App Creation Process — Part 5

Photo by James Harrison on Unsplash

Flickr API Background

Flickr API Basic URLs

Flickr API Methods

Flickr API Responses

  1. FlickrPhotosInfoResponse.swift represents the API response to the methods in lines 2–5 in the EndPoint.swift file. These calls return basic information along with the collections of photos. (Refer to Flickr_API_Result.json file in the next section for more context.)

API Errors

  1. The network call to the API fails to return any data (e.g., network error)
  2. The API returns data, but the returned data doesn’t match the expected format/content (e.g., parsing error)

JSON Background

Step 1: Understand the JSON-formatted data

https://www.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key=REPLACEWITHAPIKEY&extras=date_taken,height_z,width_z,views,url_z,latitude,longitude,accuracy,license,geo&format=json&nojsoncallback=1&per_page=3

Step 2: Build the Swift codable models to represent the JSON-formatted data

Step 3: Update the ViewModel to use the Codable data models

OAuth 1.0 Authentication

Flickr OAuth1.0 Token Process (from Flickr.com)

What’s Next?

--

--

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +768K followers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jody Abney

I’m an iOS developer with extensive professional experience in Pharma IT, SAP implementation, Data Migration, Data Analytics/Data Science, and Machine Learning