Rubyfu
Twitter
Github
NEW! Black Hat Ruby
Buy Me a Coffee
Search…
Primary version
Module 0x0 | Introduction
Contribution
Beginners
Required Gems
Module 0x1 | Basic Ruby Kung Fu
Module 0x2 | System Kung Fu
Module 0x3 | Network Kung Fu
Module 0x4 | Web Kung Fu
SQL Injection Scanner
Databases
Extending Burp Suite
Browser Manipulation
Web Services and APIs
Interacting with Web Services
Interacting with APIs
WordPress API
Twitter API
Telegram API
Ruby 2 JavaScript
Web Server and Proxy
LDAP injection
Module 0x5 | Exploitation Kung Fu
Module 0x6 | Forensic Kung Fu
Module 0x7 | OSINT Kung Fu
References
FAQs
Contributors
Powered By
GitBook
Interacting with APIs
APIs have a variety of structures to interact with their peers.
StackExchange API
require
'http'
​
json_res
=
JSON
.
parse
(
Net
::
HTTP
.
get
(
URI
.
parse
"http://api.stackexchange.com/2.2/questions?site=stackoverflow"
))
IPify API
require
'open-uri'
require
'json'
JSON
.
parse
(
open
(
'https://api.ipify.org?format=json'
).
read
)[
"ip"
]
Previous
Interacting with Web Services
Next
WordPress API
Last modified
4yr ago
Copy link