{"id":17540036,"url":"https://github.com/benchr267/resty","last_synced_at":"2025-07-04T15:37:12.089Z","repository":{"id":80270956,"uuid":"80920858","full_name":"BenchR267/Resty","owner":"BenchR267","description":"https://blog.benchr.me/post/pop-network-1/","archived":false,"fork":false,"pushed_at":"2017-02-15T18:09:11.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T04:31:41.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenchR267.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-04T13:25:43.000Z","updated_at":"2019-08-16T08:14:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c61e2eb-3980-4098-ad77-a9922051c63e","html_url":"https://github.com/BenchR267/Resty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BenchR267/Resty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenchR267%2FResty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenchR267%2FResty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenchR267%2FResty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenchR267%2FResty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenchR267","download_url":"https://codeload.github.com/BenchR267/Resty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenchR267%2FResty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263568088,"owners_count":23481613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T22:07:49.605Z","updated_at":"2025-07-04T15:37:12.066Z","avatar_url":"https://github.com/BenchR267.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Protocol oriented network abstraction in Swift\n\nPlease visit [my blog](https://blog.benchr.me/post/pop-network-1/) for more explanation.\n\nThis is a working example to fetch all public repositories of the authenticated user:\n\n```Swift\nlet githubToken = \"xxx\"\n\nlet githubAuthenticator = SimpleAuthenticator {\n    $0.setValue(\"token \\(githubToken)\", forHTTPHeaderField: \"Authorization\")\n}\n\nstruct Repository: JSONObject {\n    let desc: String\n    let name: String\n    init?(json: Any) {\n        guard let j = json as? [String: Any] else {\n            return nil\n        }\n        guard\n            let d = j[\"description\"] as? String,\n            let n = j[\"full_name\"] as? String\n        else {\n            return nil\n        }\n        self.desc = d\n        self.name = n\n    }\n}\n\nstruct RepositoryEndpoint: GET {\n    typealias ResponseType = JSONArray\u003cRepository\u003e\n    let path = \"/user/repos\"\n    var urlParameter: [String : String] {\n        return [\"visibility\": \"public\"]\n    }\n}\n\n\nlet client = Client(baseUrl: \"https://api.github.com\", authenticator: githubAuthenticator)\n\nclient.get(RepositoryEndpoint()) { response in\n    response.res?.array // -\u003e is now an array of all requested repositories\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenchr267%2Fresty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenchr267%2Fresty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenchr267%2Fresty/lists"}