Skip to content

Commit 9a17019

Browse files
committed
Split constant into API version and endpoint
1 parent 70400b2 commit 9a17019

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/qiita.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
class Qiita
66
API_BASE_URL = 'https://qiita.com'
7-
API_ITEM_ENDPOINT = '/api/v2/items'
7+
API_VERSION = 'v2'
8+
API_ITEM_ENDPOINT = "/api/#{API_VERSION}/items"
89

910
# @content: String: A content of an article
1011
# @header: Hash: A YAML header of an article

0 commit comments

Comments
 (0)