Created
February 3, 2016 05:42
-
-
Save gbertb/e6b7687d00a2a7013bb0 to your computer and use it in GitHub Desktop.
adding constants file in swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Constants.swift | |
| // | |
| // Created by Jarrod Parkes on 11/5/15. | |
| // Copyright © 2015 Udacity. All rights reserved. | |
| // | |
| // MARK: - Constants | |
| struct Constants { | |
| // MARK: Flickr | |
| struct Flickr { | |
| static let APIBaseURL = "https://api.flickr.com/services/rest/" | |
| } | |
| // MARK: Flickr Parameter Keys | |
| struct FlickrParameterKeys { | |
| static let Method = "method" | |
| static let APIKey = "api_key" | |
| static let GalleryID = "gallery_id" | |
| static let Extras = "extras" | |
| static let Format = "format" | |
| static let NoJSONCallback = "nojsoncallback" | |
| } | |
| // MARK: Flickr Parameter Values | |
| struct FlickrParameterValues { | |
| static let APIKey = "ce190e05b11ca689a9c1fac8c9de619d" | |
| static let ResponseFormat = "json" | |
| static let DisableJSONCallback = "1" /* 1 means "yes" */ | |
| static let GalleryPhotosMethod = "flickr.galleries.getPhotos" | |
| static let GalleryID = "5704-72157622566655097" | |
| static let MediumURL = "url_m" | |
| } | |
| // MARK: Flickr Response Keys | |
| struct FlickrResponseKeys { | |
| static let Status = "stat" | |
| static let Photos = "photos" | |
| static let Photo = "photo" | |
| static let Title = "title" | |
| static let MediumURL = "url_m" | |
| } | |
| // MARK: Flickr Response Values | |
| struct FlickrResponseValues { | |
| static let OKStatus = "ok" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment