Skip to content

Commit 606f804

Browse files
committed
Adds legacy search by email
1 parent 3cff4bb commit 606f804

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

content/v3/search.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ v3. There should be no changes, other than the new URL and JSON output format.
99

1010
## Search issues
1111

12+
Find issues by state and keyword.
13+
1214
GET /legacy/issues/search/:owner/:repository/:state/:keyword
1315

1416
### Parameters
@@ -24,6 +26,8 @@ keyword
2426

2527
## Search repositories
2628

29+
Find repositories by keyword.
30+
2731
GET /legacy/repos/search/:keyword
2832

2933
### Parameters
@@ -36,6 +40,8 @@ keyword
3640

3741
## Search users
3842

43+
Find users by keyword.
44+
3945
GET /legacy/user/search/:keyword
4046

4147
### Parameters
@@ -46,4 +52,13 @@ keyword
4652
<%= headers 200 %>
4753
<%= json(:user_search_results) %>
4854

55+
## Email search
4956

57+
This API call is added for compatibility reasons only. There's no guarantee
58+
that full email searches will always be available.
59+
60+
email
61+
: Email address
62+
63+
<%= headers 200 %>
64+
<%= json(:email_search_results) %>

layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ <h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/search/">
119119
<li><a href="/v3/search/#search-repositories">Search
120120
Repositories</a></li>
121121
<li><a href="/v3/search/#search-users">Search Users</a></li>
122+
<li><a href="/v3/search/#email-search">Email Search</a></li>
122123
</ul>
123124
</li>
124125
</ul>

lib/resources.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ def json(key)
532532
"users" => [USER_SEARCH_ITEM]
533533
}
534534

535+
EMAIL_SEARCH_RESULTS = {
536+
"user" => USER_SEARCH_ITEM
537+
}
538+
535539
GIST_HISTORY = {
536540
"history" => [
537541
{

0 commit comments

Comments
 (0)