{"repo":"nerdishbynature/octokit.swift","free":true,"listed":false,"github":"https://github.com/nerdishbynature/octokit.swift","clone":"git clone https://github.com/nerdishbynature/octokit.swift.git","description":"A Swift API Client for GitHub and GitHub Enterprise","language":"Swift","stars":521,"topics":["swift","oauth-flow","github-enterprise","octokit","api-client","github","github-api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Octokit.swift Installation - Using Swift Package Manager : Authentication Octokit supports both, GitHub and GitHub Enterprise. Authentication is handled using Configurations. There are two types of Configurations, TokenConfiguration and OAuthConfiguration . TokenConfiguration TokenConfiguration is used if you are using Access Token based Authentication (e.g. the user offered you an access token he generated on the website) or if you got an Access Token through the OAuth Flow You can initialize a new config for github.com as follows: or for GitHub Enterprise After you got your token you can use it with Octokit OAuthConfiguration OAuthConfiguration is meant to be used, if you don't have an access token already and the user has to login to your application. This also handles the OAuth flow. You can authenticate an user for github.com as follows: or for GitHub Enterprise After you got your config you can authenticate the user: Please note that you will be given a TokenConfiguration back from the OAuth flow. You have to store the accessToken yourself. If you want to make further requests it is not necessary to do the OAuth Flow again. You can just use a TokenConfiguration . Users Get a single user Get the authenticated user Repositories Get a single repository Get repositories of authenticated user Starred Repositories Get starred repositories of some user Get starred repositories of authenticated user Follower and Following Get followers of some user Get followers of authenticate","default_branch":null,"files":null,"tree":[],"storefront":"/r/nerdishbynature","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nerdishbynature/octokit.swift/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}