Skip to content

.get(owner: owner, repo: name.. returns nil values because of bad parsing (actually it's 401_) #12

@skywinder

Description

@skywinder
 let authentication = AccessTokenAuthentication(access_token: GITHUB_TOKEN)
            let ghapi = RepositoriesAPI(authentication: authentication)
            ghapi.get(owner: owner, repo: name, completion:
                { (response, error) in
                if response != nil {
                    print(response!)
                } else {
                    print(error ?? "empty response")
                }
            })

returns repo with all nil's.

Actually session returns 401 with description:

Optional<String>
  - some : "{\"message\":\"Bad credentials\",\"documentation_url\":\"https://developer.github.com/v3\"}"

Can't realize, how to do authentification the right way

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions