vimeo/VimeoNetworking

Always getting 404

Closed this issue · 0 comments

`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)")
            
            
        }
    }
}`