Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unleashing Hyperdrive

Unleashing Hyperdrive

Unleashing Hyperdrive, a Swift API client utilising Hypermedia and API Blueprint

Kyle Fuller

April 17, 2015
Tweet

More Decks by Kyle Fuller

Other Decks in Technology

Transcript

  1. Ability to change implementation details 4 Change fields used in

    forms 4 Change validation of attributes in forms 4 Change URIs of resources (/polls/{id} -> / questions/{slug}) 4 Change HTTP methods (PUT -> PATCH) 4 Change the content-type
  2. if let questions = representor.links["questions"] { // The API offered

    us a link to questions } else { // Gracefully handle when this feature is missing }
  3. if let create = representor.transitions["create"] { // API supports creation

    } else { // Feature is missing // Let's not show the create button in our UI }
  4. let attributes = [ "question": "Favourite language?", "choices": [ "Swift",

    "Ruby", "Python", ] ] hyperdrive.request(create, attributes) { }