class Thunderstore::Client
- Thunderstore::Client
- Reference
- Object
Defined in:
thunderstore/client.crConstant Summary
-
BASE_URL =
"https://thunderstore.io"
Constructors
Instance Method Summary
-
#base_url : URI
Returns the base url for which this client will make API requests to.
- #community : String
- #community=(community : String)
-
#get(path : String) : HTTP::Client::Response
Initializes an
HTTP::Client
for the configured#base_url
, and executes a GET request on the specifiedpath
. -
#set_community(community : String)
Sets the
@community
instance variable.
Constructor Detail
Instance Method Detail
def get(path : String) : HTTP::Client::Response
#
Initializes an HTTP::Client
for the configured #base_url
, and executes a GET request on the specified path
.
The response will have its body as a String, accessed via HTTP::Client::Response#body
.
def set_community(community : String)
#
Sets the @community
instance variable.
You can find a list of communities by going to https://thunderstore.io
and looking at the the subdomains that each mod community is listed under.