github-search 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +250 -0
- data/Rakefile +10 -0
- data/github-search.gemspec +29 -0
- data/lib/github-search.rb +12 -0
- data/lib/github-search/issue.rb +55 -0
- data/lib/github-search/repository.rb +151 -0
- data/lib/github-search/search_string_builder.rb +63 -0
- data/lib/github-search/searcher.rb +35 -0
- data/lib/github-search/user.rb +51 -0
- data/lib/github-search/version.rb +3 -0
- data/test/fixtures/search_issues.yml +73 -0
- data/test/fixtures/search_issues_order_ascending.yml +73 -0
- data/test/fixtures/search_issues_order_descending.yml +73 -0
- data/test/fixtures/search_issues_sort_by_comments.yml +73 -0
- data/test/fixtures/search_issues_sort_by_created_at.yml +73 -0
- data/test/fixtures/search_issues_sort_by_updated_at.yml +73 -0
- data/test/fixtures/search_repositories.yml +69 -0
- data/test/fixtures/search_repositories_order_ascending.yml +74 -0
- data/test/fixtures/search_repositories_order_descending.yml +74 -0
- data/test/fixtures/search_repositories_sort_by_forks.yml +74 -0
- data/test/fixtures/search_repositories_sort_by_stars.yml +74 -0
- data/test/fixtures/search_repositories_sort_by_updated_at.yml +74 -0
- data/test/fixtures/search_users.yml +69 -0
- data/test/issues/issue_test.rb +132 -0
- data/test/repositories/repository_test.rb +181 -0
- data/test/test_helper.rb +9 -0
- data/test/users/user_test.rb +41 -0
- metadata +192 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module GithubSearch
|
5
|
+
class SearchStringBuilder
|
6
|
+
|
7
|
+
def build_search_string(args, opts, model)
|
8
|
+
|
9
|
+
args_string = args_untangler(args)
|
10
|
+
opts_string = opts_untangler(opts, model)
|
11
|
+
|
12
|
+
search_string = args_string
|
13
|
+
search_string += "+" if opts_string
|
14
|
+
search_string += opts_string
|
15
|
+
end
|
16
|
+
|
17
|
+
def args_untangler(args)
|
18
|
+
search_params = "?q="
|
19
|
+
plus = ""
|
20
|
+
args.each do |search_term|
|
21
|
+
search_params += "#{plus}#{search_term}"
|
22
|
+
plus = "+"
|
23
|
+
end
|
24
|
+
search_params
|
25
|
+
end
|
26
|
+
|
27
|
+
def opts_untangler(opts, model)
|
28
|
+
sort_string = sort_untangler(opts[:sort], model) if opts[:sort]
|
29
|
+
opts.delete(:sort)
|
30
|
+
|
31
|
+
order_string = order_untangler(opts[:order]) if opts[:order]
|
32
|
+
opts.delete(:order)
|
33
|
+
|
34
|
+
search_params = ""
|
35
|
+
plus = ""
|
36
|
+
opts.each do |key, value|
|
37
|
+
search_params += "#{plus}#{key}:#{value}"
|
38
|
+
plus = "+"
|
39
|
+
end
|
40
|
+
search_params += sort_string || ""
|
41
|
+
search_params += order_string || ""
|
42
|
+
end
|
43
|
+
|
44
|
+
def sort_untangler(sort_param, model)
|
45
|
+
if model.sort_options.include?(sort_param)
|
46
|
+
sort_string = "&sort=#{sort_param.to_s}"
|
47
|
+
else
|
48
|
+
# todo: error handling
|
49
|
+
puts "You can only sort a #{model} for #{model.sort_options}. (default is best match)"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def order_untangler(order_param)
|
54
|
+
if [:asc, :desc].include?(order_param)
|
55
|
+
order_string = "&order=#{order_param.to_s}"
|
56
|
+
else
|
57
|
+
# todo: error handling
|
58
|
+
puts "You can only order repositories with :asc or :desc (default is desc)"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module GithubSearch
|
5
|
+
class Searcher
|
6
|
+
|
7
|
+
def search(*args, opts)
|
8
|
+
search_string_builder = SearchStringBuilder.new
|
9
|
+
search_string = search_string_builder.build_search_string(args, opts, @model)
|
10
|
+
|
11
|
+
response = Faraday.get("#{API_URL}/#{@path}#{search_string}")
|
12
|
+
items = JSON.parse(response.body)["items"]
|
13
|
+
items.map { |attributes| @model.new(attributes) }
|
14
|
+
end
|
15
|
+
|
16
|
+
def issues
|
17
|
+
@path = "issues"
|
18
|
+
@model = Issue
|
19
|
+
self
|
20
|
+
end
|
21
|
+
|
22
|
+
def repos
|
23
|
+
@path = "repositories"
|
24
|
+
@model = Repository
|
25
|
+
self
|
26
|
+
end
|
27
|
+
|
28
|
+
def users
|
29
|
+
@path = "users"
|
30
|
+
@model = User
|
31
|
+
self
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module GithubSearch
|
5
|
+
class User < Searcher
|
6
|
+
attr_reader :id,
|
7
|
+
:login,
|
8
|
+
:avatar_url,
|
9
|
+
:gravatar_id,
|
10
|
+
:url,
|
11
|
+
:html_url,
|
12
|
+
:followers_url,
|
13
|
+
:following_url,
|
14
|
+
:gists_url,
|
15
|
+
:starred_url,
|
16
|
+
:subscriptions_url,
|
17
|
+
:organizations_url,
|
18
|
+
:repos_url,
|
19
|
+
:events_url,
|
20
|
+
:received_events_url,
|
21
|
+
:type,
|
22
|
+
:site_admin,
|
23
|
+
:score
|
24
|
+
|
25
|
+
def initialize(attributes)
|
26
|
+
@id = attributes["id"]
|
27
|
+
@login = attributes["login"]
|
28
|
+
@avatar_url = attributes["avatar_url"]
|
29
|
+
@gravatar_id = attributes["gravatar_id"]
|
30
|
+
@url = attributes["url"]
|
31
|
+
@html_url = attributes["html_url"]
|
32
|
+
@followers_url = attributes["followers_url"]
|
33
|
+
@following_url = attributes["following_url"]
|
34
|
+
@gists_url = attributes["gists_url"]
|
35
|
+
@starred_url = attributes["starred_url"]
|
36
|
+
@subscriptions_url = attributes["subscriptions_url"]
|
37
|
+
@organizations_url = attributes["organizations_url"]
|
38
|
+
@repos_url = attributes["repos_url"]
|
39
|
+
@events_url = attributes["events_url"]
|
40
|
+
@received_events_url = attributes["received_events_url"]
|
41
|
+
@type = attributes["type"]
|
42
|
+
@site_admin = attributes["site_admin"]
|
43
|
+
@score = attributes["score"]
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.sort_options
|
47
|
+
[:followers, :repositories, :joined]
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/search/issues?q=test%20issue%20repo:Morred/github-search%20label:enhancement
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- GitHub.com
|
23
|
+
Date:
|
24
|
+
- Mon, 19 Jan 2015 10:58:49 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Status:
|
30
|
+
- 200 OK
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '10'
|
33
|
+
X-Ratelimit-Remaining:
|
34
|
+
- '9'
|
35
|
+
X-Ratelimit-Reset:
|
36
|
+
- '1421665189'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Github-Media-Type:
|
40
|
+
- github.v3
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Frame-Options:
|
44
|
+
- deny
|
45
|
+
Content-Security-Policy:
|
46
|
+
- default-src 'none'
|
47
|
+
Access-Control-Allow-Credentials:
|
48
|
+
- 'true'
|
49
|
+
Access-Control-Expose-Headers:
|
50
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
51
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
X-Github-Request-Id:
|
55
|
+
- 72A7C5D7:2985:C4AF25:54BCE369
|
56
|
+
Strict-Transport-Security:
|
57
|
+
- max-age=31536000; includeSubdomains; preload
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
X-Served-By:
|
63
|
+
- 474556b853193c38f1b14328ce2d1b7d
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"total_count":2,"incomplete_results":false,"items":[{"url":"https://api.github.com/repos/Morred/github-search/issues/2","labels_url":"https://api.github.com/repos/Morred/github-search/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/2/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/2/events","html_url":"https://github.com/Morred/github-search/issues/2","id":54452074,"number":2,"title":"This
|
67
|
+
is another test issue.","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-15T14:02:14Z","updated_at":"2015-01-15T14:02:20Z","closed_at":null,"body":"This
|
68
|
+
is another test issue.","score":10.624432},{"url":"https://api.github.com/repos/Morred/github-search/issues/1","labels_url":"https://api.github.com/repos/Morred/github-search/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/1/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/1/events","html_url":"https://github.com/Morred/github-search/issues/1","id":54451965,"number":1,"title":"This
|
69
|
+
is a test issue","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-15T14:01:13Z","updated_at":"2015-01-15T14:01:26Z","closed_at":null,"body":"This
|
70
|
+
is a test issue.","score":10.624389}]}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Mon, 19 Jan 2015 10:58:49 GMT
|
73
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/search/issues?order=asc&q=test%20issue%20repo:Morred/github-search%20label:enhancement&sort=comments
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- GitHub.com
|
23
|
+
Date:
|
24
|
+
- Sat, 28 Mar 2015 06:29:06 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Status:
|
30
|
+
- 200 OK
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '10'
|
33
|
+
X-Ratelimit-Remaining:
|
34
|
+
- '9'
|
35
|
+
X-Ratelimit-Reset:
|
36
|
+
- '1427524206'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Github-Media-Type:
|
40
|
+
- github.v3
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Frame-Options:
|
44
|
+
- deny
|
45
|
+
Content-Security-Policy:
|
46
|
+
- default-src 'none'
|
47
|
+
Access-Control-Allow-Credentials:
|
48
|
+
- 'true'
|
49
|
+
Access-Control-Expose-Headers:
|
50
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
51
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
X-Github-Request-Id:
|
55
|
+
- 998C38D8:1867:78519C:55164A31
|
56
|
+
Strict-Transport-Security:
|
57
|
+
- max-age=31536000; includeSubdomains; preload
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
X-Served-By:
|
63
|
+
- 065b43cd9674091fec48a221b420fbb3
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"total_count":2,"incomplete_results":false,"items":[{"url":"https://api.github.com/repos/Morred/github-search/issues/2","labels_url":"https://api.github.com/repos/Morred/github-search/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/2/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/2/events","html_url":"https://github.com/Morred/github-search/issues/2","id":54452074,"number":2,"title":"This
|
67
|
+
is another test issue.","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T14:02:14Z","updated_at":"2015-03-28T06:06:22Z","closed_at":null,"body":"This
|
68
|
+
is another test issue.","score":9.096387},{"url":"https://api.github.com/repos/Morred/github-search/issues/1","labels_url":"https://api.github.com/repos/Morred/github-search/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/1/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/1/events","html_url":"https://github.com/Morred/github-search/issues/1","id":54451965,"number":1,"title":"This
|
69
|
+
is a test issue","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T14:01:13Z","updated_at":"2015-03-28T06:06:11Z","closed_at":null,"body":"This
|
70
|
+
is a test issue.","score":9.096374}]}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Sat, 28 Mar 2015 06:29:07 GMT
|
73
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/search/issues?order=desc&q=test%20issue%20repo:Morred/github-search%20label:enhancement&sort=comments
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- GitHub.com
|
23
|
+
Date:
|
24
|
+
- Sat, 28 Mar 2015 06:29:09 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Status:
|
30
|
+
- 200 OK
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '10'
|
33
|
+
X-Ratelimit-Remaining:
|
34
|
+
- '8'
|
35
|
+
X-Ratelimit-Reset:
|
36
|
+
- '1427524206'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Github-Media-Type:
|
40
|
+
- github.v3
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Frame-Options:
|
44
|
+
- deny
|
45
|
+
Content-Security-Policy:
|
46
|
+
- default-src 'none'
|
47
|
+
Access-Control-Allow-Credentials:
|
48
|
+
- 'true'
|
49
|
+
Access-Control-Expose-Headers:
|
50
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
51
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
X-Github-Request-Id:
|
55
|
+
- 998C38D8:186B:14EFA37:55164A34
|
56
|
+
Strict-Transport-Security:
|
57
|
+
- max-age=31536000; includeSubdomains; preload
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
X-Served-By:
|
63
|
+
- 13d09b732ebe76f892093130dc088652
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"total_count":2,"incomplete_results":false,"items":[{"url":"https://api.github.com/repos/Morred/github-search/issues/1","labels_url":"https://api.github.com/repos/Morred/github-search/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/1/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/1/events","html_url":"https://github.com/Morred/github-search/issues/1","id":54451965,"number":1,"title":"This
|
67
|
+
is a test issue","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T14:01:13Z","updated_at":"2015-03-28T06:06:11Z","closed_at":null,"body":"This
|
68
|
+
is a test issue.","score":9.102879},{"url":"https://api.github.com/repos/Morred/github-search/issues/2","labels_url":"https://api.github.com/repos/Morred/github-search/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/2/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/2/events","html_url":"https://github.com/Morred/github-search/issues/2","id":54452074,"number":2,"title":"This
|
69
|
+
is another test issue.","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T14:02:14Z","updated_at":"2015-03-28T06:06:22Z","closed_at":null,"body":"This
|
70
|
+
is another test issue.","score":9.102892}]}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Sat, 28 Mar 2015 06:29:09 GMT
|
73
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.github.com/search/issues?q=test%20issue%20repo:Morred/github-search%20label:enhancement&sort=comments
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- GitHub.com
|
23
|
+
Date:
|
24
|
+
- Sun, 05 Apr 2015 06:19:53 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Transfer-Encoding:
|
28
|
+
- chunked
|
29
|
+
Status:
|
30
|
+
- 200 OK
|
31
|
+
X-Ratelimit-Limit:
|
32
|
+
- '10'
|
33
|
+
X-Ratelimit-Remaining:
|
34
|
+
- '8'
|
35
|
+
X-Ratelimit-Reset:
|
36
|
+
- '1428214852'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Github-Media-Type:
|
40
|
+
- github.v3
|
41
|
+
X-Xss-Protection:
|
42
|
+
- 1; mode=block
|
43
|
+
X-Frame-Options:
|
44
|
+
- deny
|
45
|
+
Content-Security-Policy:
|
46
|
+
- default-src 'none'
|
47
|
+
Access-Control-Allow-Credentials:
|
48
|
+
- 'true'
|
49
|
+
Access-Control-Expose-Headers:
|
50
|
+
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
|
51
|
+
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
52
|
+
Access-Control-Allow-Origin:
|
53
|
+
- "*"
|
54
|
+
X-Github-Request-Id:
|
55
|
+
- 7E1253F7:54C3:974A23:5520D408
|
56
|
+
Strict-Transport-Security:
|
57
|
+
- max-age=31536000; includeSubdomains; preload
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
X-Served-By:
|
63
|
+
- 4c8b2d4732c413f4b9aefe394bd65569
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"total_count":2,"incomplete_results":false,"items":[{"url":"https://api.github.com/repos/Morred/github-search/issues/1","labels_url":"https://api.github.com/repos/Morred/github-search/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/1/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/1/events","html_url":"https://github.com/Morred/github-search/issues/1","id":54451965,"number":1,"title":"This
|
67
|
+
is a test issue","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T14:01:13Z","updated_at":"2015-03-28T06:06:11Z","closed_at":null,"body":"This
|
68
|
+
is a test issue.","score":8.851841},{"url":"https://api.github.com/repos/Morred/github-search/issues/2","labels_url":"https://api.github.com/repos/Morred/github-search/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Morred/github-search/issues/2/comments","events_url":"https://api.github.com/repos/Morred/github-search/issues/2/events","html_url":"https://github.com/Morred/github-search/issues/2","id":54452074,"number":2,"title":"This
|
69
|
+
is another test issue.","user":{"login":"Morred","id":4008608,"avatar_url":"https://avatars.githubusercontent.com/u/4008608?v=3","gravatar_id":"","url":"https://api.github.com/users/Morred","html_url":"https://github.com/Morred","followers_url":"https://api.github.com/users/Morred/followers","following_url":"https://api.github.com/users/Morred/following{/other_user}","gists_url":"https://api.github.com/users/Morred/gists{/gist_id}","starred_url":"https://api.github.com/users/Morred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morred/subscriptions","organizations_url":"https://api.github.com/users/Morred/orgs","repos_url":"https://api.github.com/users/Morred/repos","events_url":"https://api.github.com/users/Morred/events{/privacy}","received_events_url":"https://api.github.com/users/Morred/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Morred/github-search/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T14:02:14Z","updated_at":"2015-03-28T06:06:22Z","closed_at":null,"body":"This
|
70
|
+
is another test issue.","score":8.851852}]}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Sun, 05 Apr 2015 06:19:53 GMT
|
73
|
+
recorded_with: VCR 2.9.3
|