Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dc177c4

Browse files
authoredSep 3, 2019
Merge pull request #5 from roboxv/master
Use advanced Search API endpoint
2 parents 4faf08f + 38665ad commit dc177c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎src/so.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
SITE = 'stackoverflow'
3636

3737
# API endpoint for all Stack Exchange sites
38-
API_URL = 'https://api.stackexchange.com/2.2/search'
38+
API_URL = 'https://api.stackexchange.com/2.2/search/advanced'
3939

4040
# Number of results to fetch from API
4141
RESULT_COUNT = 50
@@ -83,7 +83,7 @@ def get_answers(query=None, tags=None, limit=RESULT_COUNT):
8383
'site': SITE
8484
}
8585
if query:
86-
params['intitle'] = query
86+
params['q'] = query
8787
if tags:
8888
params['tagged'] = ';'.join(tags)
8989

‎src/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.1
1+
1.3

0 commit comments

Comments
 (0)
Please sign in to comment.