Skip to content

Commit bfc720b

Browse files
committed
Use fixie address for connpass API requests
1 parent af72eec commit bfc720b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/event_service/client.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Client
33
class_attribute :debug
44
self.debug = false
55

6-
def initialize(endpoint, &block)
7-
@conn = connection_for(endpoint, &block)
6+
def initialize(endpoint, proxy: nil, &block)
7+
@conn = connection_for(endpoint, proxy, &block)
88
end
99

1010
def get(path, params)
@@ -13,8 +13,8 @@ def get(path, params)
1313

1414
private
1515

16-
def connection_for(endpoint)
17-
Faraday.new(endpoint) do |f|
16+
def connection_for(endpoint, proxy)
17+
Faraday.new(endpoint, proxy: proxy) do |f|
1818
f.response :logger if self.class.debug
1919
f.response :json, :content_type => /\bjson$/
2020
f.response :raise_error

lib/event_service/providers/connpass.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Connpass
55
# NOTE: 期間は ym or ymd パラメータで指定(複数指定可能)、未指定時全期間が対象
66

77
def initialize
8-
@client = EventService::Client.new(ENDPOINT)
8+
@client = EventService::Client.new(ENDPOINT, proxy: ENV['FIXIE_URL'])
99
end
1010

1111
def search(keyword:)

0 commit comments

Comments
 (0)