Method: Libring::API#get_all_messages
- Defined in:
- lib/libring/api.rb
#get_all_messages ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/libring/api.rb', line 114 def require "net/https" require "uri" require "json" uri = URI.parse("https://api.libring.com/v2/messages/get_all") https = Net::HTTP.new(uri.host, uri.port) https.use_ssl = true req = Net::HTTP::Get.new(uri.request_uri, initheader = {'Content-Type' =>'application/json', 'Authorization' => "Token #{@token}"}) resp = https.request(req) resp.body end |