vimeo / VimeoNetworking

The Vimeo API iOS SDK
MIT License
84 stars 51 forks source link

Always getting 404 #417

Closed dipkasyap closed 4 years ago

dipkasyap commented 4 years ago
`import VimeoNetworking
fileprivate func initVemo() {

    let appConfiguration = AppConfiguration(
    clientIdentifier: "myclientID", //"Your client identifier goes here",
    clientSecret: "mysecret", //"Your client secret goes here",
    scopes: [.Public], //, .Private, .Interact],
    keychainService: "KeychainServiceVimeo")

    let vimeoClient = VimeoClient(appConfiguration: appConfiguration, configureSessionManagerBlock: nil)

    let authenticationController = AuthenticationController(client: vimeoClient, appConfiguration: appConfiguration, configureSessionManagerBlock: nil)

    authenticationController.clientCredentialsGrant { result in
        switch result {

        case .success(let account):
            print("Successfully authenticated with account: \(account)")

            let videoRequest = Request<VIMVideo>(path: "/videos/383661322")

            vimeoClient.request(videoRequest) { result in
                switch result {
                case .success(let response):
                    let video: VIMVideo = response.model
                    print("retrieved video: \(video)")
                case .failure(let error ):
                    print("error retrieving video: \(error)")
                }
            }

        case .failure(let error):
            print("error authenticating: \(error)")

        }
    }
}`