Skip to content

lanserxt/teamwork-ios-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TeamWork iOS SDK

Swift API wrapper for TeamWork API.

##Requirements

  • Xcode 7 (or higher)
  • Apple LLVM compiler
  • SWIFT 3.0
  • iOS 9.1 (or higher)

##Installation

Recommended way to install TeamWork iOS SDK is via CocoaPods. Add the following line to your Podfile:

pod 'TeamWork-iOS-SDK'

##Usage

You just need to create an instance of TWApiClient and pass your URL and token. Token can be obtained in your Profile API section.

class ViewController: UIViewController {
    
    fileprivate let apiClient:TWApiClient = TWApiClient.init(url: "your_url", token: "your_token")

    override func viewDidLoad() {
        super.viewDidLoad()
        
        apiClient.getAuthenticate { (success, code, account, error) in
            self.getProjects()
        }
    }

    private func getProjects() {
        apiClient.getAllProjects(urlParams: "status=ALL") { [weak self] (success, code, projects, error) in
            for project: Project in projects!{
                print("Name: \(project.name!) id: \(project.id!)")
            }
        }        
    }
}

About

TeamWork API for iOS [Swift]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages