veetaw / Launch-Library-Swift-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Launch Library

How to use

Instantiate LaunchLibrary with

let v: LaunchLibrary = LaunchLibrary()

To get all the next launches:

        v.getLaunches() { (launches: [Launch?]?, error: LaunchLibraryErrors?) in
            if let error = error {
                print(error)
            }
            
            if let launches = launches {
                print(launches)
            }
        }

To get launch info by id (gotten with getLaunches())

        v.getLaunchById(1344) { (launch: CompleteLaunch?, error: LaunchLibraryErrors?) in
            if let error = error {
                print(error)
            }
            
            if let launch = launch {
                print(launch)
            }
        }

##IMPORTANT: This is part of me trying to learn swift, so every help or suggestion about anything would be very appreciated.

About

License:GNU General Public License v3.0


Languages

Language:Swift 100.0%