lib/atlas_rb/resource.rb in atlas_rb-0.0.37 vs lib/atlas_rb/resource.rb in atlas_rb-0.0.38
- old
+ new
@@ -1,7 +1,11 @@
# frozen_string_literal: true
module AtlasRb
class Resource
extend AtlasRb::FaradayHelper
+
+ def self.find(id)
+ JSON.parse(connection({}).get('/resources/' + id)&.body)
+ end
end
end