class Thunderstore::Client

Defined in:

thunderstore/client.cr

Constant Summary

BASE_URL = "https://thunderstore.io"

Constructors

Instance Method Summary

Constructor Detail

def self.new(community : String = "") #

[View source]

Instance Method Detail

def base_url : URI #

Returns the base url for which this client will make API requests to.


[View source]
def community : String #

[View source]
def community=(community : String) #

[View source]
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.


[View source]
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.


[View source]