• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 10 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift implementation of URI Template (RFC6570)

URITemplate

Swift implementation of URI Template (RFC6570).

Installation

CocoaPods is the recommended installation method.

pod 'URITemplate'

Example

Expanding a URI Template

let template = URITemplate(template: "https://api.github.com/repos/{owner}/{repo}/")
let url = template.expand(["owner": "kylef", "repo": "URITemplate.swift"])
=> "https://api.github.com/repos/kylef/URITemplate.swift/"

Determine which variables are in a template

let variables = template.variables
=> ["owner", "repo"]

Extract the variables used in a given URL

let variables = template.extract("https://api.github.com/repos/kylef/PathKit/")
=> ["owner":"kylef", "repo":"PathKit"]

RFC6570

The URITemplate library follows the test suite.

We have full support for level 4 of RFC6570 when expanding a template and retrieving the variables in a template.

For extraction of variables from an already expanded template, level 3 is supported.

License

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

More Repositories

1

swiftenv

Swift Version Manager
Shell
1,979
star
2

Commander

Compose beautiful command line interfaces in Swift
Swift
1,530
star
3

Mockingjay

An elegant library for stubbing HTTP requests with ease in Swift
Swift
1,490
star
4

PathKit

Effortless path operations in Swift
Swift
1,453
star
5

JSONWebToken.swift

Swift implementation of JSON Web Token (JWT).
Swift
763
star
6

Spectre

BDD Framework and test runner for Swift projects and playgrounds
Swift
403
star
7

JSONSchema.swift

JSON Schema validator in Swift
Swift
274
star
8

apiblueprint.vim

This vim plugin brings syntax highlighting and linting for API Blueprint.
Vim Script
113
star
9

dotfiles

kylef's dotfile
Vim Script
33
star
10

swiftenv-api

API for swiftenv to return the available versions of Swift
Python
25
star
11

draughtsman

API Blueprint Parser for Python 3
Python
23
star
12

changelog

A formal specification for changelog files and entries
18
star
13

goji

Command line JIRA client
Python
18
star
14

swiftenv-docker

This repository contains swiftenv images for Docker
Makefile
18
star
15

irctk

A Python IRC client library
Python
6
star
16

maintain

A unified interface to maintaining projects of any language.
Python
6
star
17

ucp

A simple and universal command line tool for capturing screenshots and uploading to the web.
Shell
5
star
18

redirector

Simple web server for HTTP redirecting from one domain to another.
Python
4
star
19

pygments-apiblueprint

An API Blueprint Lexer for Pygments
Python
3
star
20

refract.py

A Python library for interacting with Refract
Python
3
star
21

life

This repository is used as a personal issue tracker
2
star
22

homebrew-formulae

Ruby
1
star