Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Yes! You should provide a client library for your API! Daniel Azuma Nov 13, 2018
Slide 2
Slide 2 text
Source: https://pixabay.com/en/hands-raised-raised-hands-arms-up-1768845/ License: CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
Slide 3
Slide 3 text
API Client Library
Slide 4
Slide 4 text
API Client Library A Ruby gem providing a nice Ruby interface for calling a network API
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
Daniel Azuma @danielazuma http:/ /daniel-azuma.com/
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
.rb .py .js .go .php .rb .py .js .go .php .rb .py .js .go .php .rb .py .js .go .php … … >10 languages >250 services
Slide 10
Slide 10 text
Is it worth it?
Slide 11
Slide 11 text
Source: https://pixabay.com/en/baby-boy-child-childhood-computer-84627/ License: CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
Slide 12
Slide 12 text
No content
Slide 13
Slide 13 text
APIs are hard
Slide 14
Slide 14 text
Auth
Slide 15
Slide 15 text
Retry
Slide 16
Slide 16 text
Caching
Slide 17
Slide 17 text
Auth Retry Caching Quotas Error Handling Pagination Instrumentation Long-running Operations Versioning etc…
Slide 18
Slide 18 text
API > HTTP
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
Know the protocol
Slide 21
Slide 21 text
Client Example
Slide 22
Slide 22 text
Stub Object Client Example
Slide 23
Slide 23 text
Identity / auth Client Example
Slide 24
Slide 24 text
Method calls Client Example
Slide 25
Slide 25 text
Result objects Client Example
Slide 26
Slide 26 text
no URLs no JSON no HTTP status Client Example
Slide 27
Slide 27 text
no URLs no JSON no HTTP status no retry no caching Client Example
Slide 28
Slide 28 text
DevX
Slide 29
Slide 29 text
Use Ruby abstractions
Slide 30
Slide 30 text
No content
Slide 31
Slide 31 text
Use Ruby abstractions Handle errors
Slide 32
Slide 32 text
Use Ruby abstractions Handle errors Improve safety/security
Slide 33
Slide 33 text
Use Ruby abstractions Handle errors Improve safety/security Improve performance
Slide 34
Slide 34 text
log entry send request user app client library logging service receive response return log entry send request receive response return
Slide 35
Slide 35 text
queue queue log entries log entries send batch send batch user app client library logging service
Slide 36
Slide 36 text
Use Ruby abstractions Handle errors Improve safety/security Improve performance Provide instrumentation
Slide 37
Slide 37 text
Use Ruby abstractions Handle errors Improve safety/security Improve performance Provide instrumentation
Slide 38
Slide 38 text
.rb .py .js .go .php .rb .py .js .go .php .rb .py .js .go .php .rb .py .js .go .php … … >10 languages >250 services
Slide 39
Slide 39 text
Interface Description Language
Slide 40
Slide 40 text
Interface Description Language Source: https://pixabay.com/en/book-geek-glasses-read-robot-1296590/ License: CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
Slide 41
Slide 41 text
Interface Description Language Calls
Slide 42
Slide 42 text
Interface Description Language Calls Parameters/results
Slide 43
Slide 43 text
Interface Description Language Calls Parameters/results Data types
Slide 44
Slide 44 text
Interface Description Language Calls Parameters/results Data types Properties
Slide 45
Slide 45 text
Interface Description Language Calls Parameters/results Data types Properties Documentation
Slide 46
Slide 46 text
WSDL
Slide 47
Slide 47 text
SOAP
Slide 48
Slide 48 text
https:/ /openapis.org/
Slide 49
Slide 49 text
.rb
Slide 50
Slide 50 text
Metaprogramming
Slide 51
Slide 51 text
IDL Client Library Metaprogramming Engine Generated Classes
Slide 52
Slide 52 text
IDL Client Library Metaprogramming Engine Generated Classes
Slide 53
Slide 53 text
Code generation
Slide 54
Slide 54 text
IDL Code Generator Generator Engine Client Library Generated Ruby Files
Slide 55
Slide 55 text
IDL Code Generator Generator Engine Client Library Reference Documentation Server Skeleton Automated Tests
Slide 56
Slide 56 text
No content
Slide 57
Slide 57 text
How do I get started? +
Slide 58
Slide 58 text
How do I get started? + Choose a spec standard
Slide 59
Slide 59 text
Choose a spec standard How do I get started? + Write an API description
Slide 60
Slide 60 text
Choose a spec standard How do I get started? + Write an API description Invoke an open source generator
Slide 61
Slide 61 text
Choose a spec standard How do I get started? + Write an API description Invoke an open source generator Customize the generator
Slide 62
Slide 62 text
Why to write a client library
Slide 63
Slide 63 text
Why to write a client library What should go in a client library
Slide 64
Slide 64 text
Why to write a client library What should go in a client library How to write scalable client libraries
Slide 65
Slide 65 text
Why to write a client library What should go in a client library How to write scalable client libraries
Slide 66
Slide 66 text
Yes! You should provide a client library for your API! ,
Slide 67
Slide 67 text
Yes! You should provide a client library for your API! https:/ /daniel-azuma.com/rubyconf2018