Skip to content

Commit

Permalink
Merge pull request #3 from hostari/set-community
Browse files Browse the repository at this point in the history
Add Thunderstore::Client#set_community
  • Loading branch information
xaviablaza authored Apr 30, 2022
2 parents bdb48e0 + eaf2dcb commit ddee144
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: thunderstore_client
version: 1.0.0
version: 1.0.2

authors:
- Xavi Ablaza <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions src/thunderstore/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ module Thunderstore
def initialize(@community : String = "")
end

def set_community(community : String)
@community = community
end

# Returns the base url for which this client will make API requests to
def base_url : URI
return URI.parse("https://thunderstore.io") if community.empty?
Expand Down
2 changes: 1 addition & 1 deletion src/thunderstore_client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "json"
require "http/client"

class ThunderstoreClient
VERSION = "1.0.1"
VERSION = "1.0.2"
end

require "./thunderstore/**"

0 comments on commit ddee144

Please sign in to comment.