Latest 2.0.0
Homepage https://github.com/kylef/WebLinking.swift
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Authors

 Web Linking

Swift implementation of Web Linking (RFC5988).

Installation

CocoaPods is the recommended installation method.

pod 'WebLinking'

Example

Given the following Link header on an NSHTTPURLResponse.

Link: <https://api.github.com/user/repos?page=3&per_page=100>; rel="next",
      <https://api.github.com/user/repos?page=50&per_page=100>; rel="last"

We can find the next link on a response:

if let link = response.findLink(relation: "next") {
  print("We have a next link with the URI: (link.uri).")
}

Or introspect all available links:

for link in response.links {
  print("We have a link with the relation: (link.relationType) to (link.uri).")
}

License

Web Linking is licensed under the MIT license. See LICENSE for more
info.

Latest podspec

{
    "name": "WebLinking",
    "version": "2.0.0",
    "summary": "Swift implementation of Web Linking and Link headers (RFC5988)",
    "homepage": "https://github.com/kylef/WebLinking.swift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kyle Fuller": "[email protected]"
    },
    "social_media_url": "http://twitter.com/kylefuller",
    "source": {
        "git": "https://github.com/kylef/WebLinking.swift.git",
        "tag": "2.0.0"
    },
    "source_files": "Sources/*.swift",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This