From c70e105a5954c528acb20ab4a0e74a63033aa299 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 15:16:05 +0200 Subject: [PATCH 1/9] add jason to mix.exs deps --- mix.exs | 1 + 1 file changed, 1 insertion(+) diff --git a/mix.exs b/mix.exs index 75ebc96..6acbb1b 100644 --- a/mix.exs +++ b/mix.exs @@ -38,6 +38,7 @@ defmodule Tentacat.Mixfile do [ {:httpoison, "~> 1.0"}, {:exjsx, "~> 4.0"}, + {:jason, "~> 1.2"}, {:earmark, "~> 1.2", only: :dev}, {:ex_doc, "~> 0.19", only: :dev}, {:inch_ex, "~> 0.5", only: :dev}, From 8d678827eb3306f3cc15a0842a581a0aa4457099 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 15:41:19 +0200 Subject: [PATCH 2/9] fun formatter --- config/config.exs | 3 +-- lib/tentacat.ex | 11 +++++++++-- lib/tentacat/client.ex | 2 +- lib/tentacat/repositories/contents.ex | 1 - test/client_test.exs | 3 +-- test/pulls/reviews_test.exs | 4 +++- test/repositories/collaborators_test.exs | 6 ++++-- test/repositories/deploy_keys_test.exs | 4 +++- 8 files changed, 22 insertions(+), 12 deletions(-) diff --git a/config/config.exs b/config/config.exs index f57458e..fb9b141 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,8 +1,7 @@ use Mix.Config -config :exvcr, [ +config :exvcr, vcr_cassette_library_dir: "test/fixture/vcr_cassettes", filter_sensitive_data: [ [pattern: "token [^\"]+", placeholder: "token yourtokencomeshere"] ] -] \ No newline at end of file diff --git a/lib/tentacat.ex b/lib/tentacat.ex index fc4cf40..8f953e0 100644 --- a/lib/tentacat.ex +++ b/lib/tentacat.ex @@ -15,9 +15,11 @@ defmodule Tentacat do def process_response_body(""), do: nil def process_response_body(body), do: JSX.decode!(body, deserialization_options()) - @spec process_response(HTTPoison.Response.t() | {integer, any, HTTPoison.Response.t()}) :: response + @spec process_response(HTTPoison.Response.t() | {integer, any, HTTPoison.Response.t()}) :: + response def process_response(%HTTPoison.Response{status_code: status_code, body: body} = resp), do: {status_code, body, resp} + def process_response({_status_code, _, %HTTPoison.Response{} = resp}), do: process_response(resp) @@ -166,16 +168,21 @@ defmodule Tentacat do end end - @spec build_pagination_response(HTTPoison.Response.t() | {integer, any, HTTPoison.Response.t()}, Client.auth()) :: pagination_response + @spec build_pagination_response( + HTTPoison.Response.t() | {integer, any, HTTPoison.Response.t()}, + Client.auth() + ) :: pagination_response defp build_pagination_response(%HTTPoison.Response{:headers => headers} = resp, auth) do {process_response(resp), next_link(headers), auth} end + defp build_pagination_response({_, _, %HTTPoison.Response{} = resp}, auth) do build_pagination_response(resp, auth) end defp location_header({_, _, resp}), do: location_header(resp) + defp location_header(resp) do [{"Location", url}] = Enum.filter(resp.headers, &match?({"Location", _}, &1)) url diff --git a/lib/tentacat/client.ex b/lib/tentacat/client.ex index 69c8b15..da02512 100644 --- a/lib/tentacat/client.ex +++ b/lib/tentacat/client.ex @@ -33,7 +33,7 @@ defmodule Tentacat.Client do @spec new(map(), binary) :: t def new(auth = %{jwt: _}, endpoint) do - pnew(auth, endpoint) + pnew(auth, endpoint) end @spec new(auth, binary) :: t diff --git a/lib/tentacat/repositories/contents.ex b/lib/tentacat/repositories/contents.ex index 75ab6cb..0e75388 100644 --- a/lib/tentacat/repositories/contents.ex +++ b/lib/tentacat/repositories/contents.ex @@ -15,5 +15,4 @@ defmodule Tentacat.Repositories.Contents do def content(client \\ %Client{}, owner, repo, path) do get("repos/#{owner}/#{repo}/contents/#{path}", client) end - end diff --git a/test/client_test.exs b/test/client_test.exs index 058ecd3..caca7a7 100644 --- a/test/client_test.exs +++ b/test/client_test.exs @@ -12,12 +12,11 @@ defmodule Tentacat.ClientTest do test "custom endpoint" do expected = "https://ghe.foo.com/api/v3/" - creds = %{user: "bob", password: "bob"} + creds = %{user: "bob", password: "bob"} client = new(creds, "https://ghe.foo.com/api/v3/") assert client.endpoint == expected - client = new("https://ghe.foo.com/api/v3/") assert client.endpoint == expected diff --git a/test/pulls/reviews_test.exs b/test/pulls/reviews_test.exs index ba2d7cf..3d7b51c 100644 --- a/test/pulls/reviews_test.exs +++ b/test/pulls/reviews_test.exs @@ -30,7 +30,9 @@ defmodule Tentacat.Pulls.ReviewsTests do } use_cassette "pulls/reviews#create" do - {status_code, _, _} = create(@client, "sreecodeslayer", "to-test-github-app-events", "1", body) + {status_code, _, _} = + create(@client, "sreecodeslayer", "to-test-github-app-events", "1", body) + assert status_code == 200 end end diff --git a/test/repositories/collaborators_test.exs b/test/repositories/collaborators_test.exs index 6f16710..f99b9cc 100644 --- a/test/repositories/collaborators_test.exs +++ b/test/repositories/collaborators_test.exs @@ -26,8 +26,10 @@ defmodule Tentacat.Repositories.CollaboratorsTest do test "permission/4" do use_cassette "repositories/collaborators#permission" do - assert {200, %{"permission" => "admin"}, _} = permission(@client, "bmarkons", "script", "bmarkons") - assert {200, %{"permission" => "read"}, _} = permission(@client, "bmarkons", "script", "no") + assert {200, %{"permission" => "admin"}, _} = + permission(@client, "bmarkons", "script", "bmarkons") + + assert {200, %{"permission" => "read"}, _} = permission(@client, "bmarkons", "script", "no") end end diff --git a/test/repositories/deploy_keys_test.exs b/test/repositories/deploy_keys_test.exs index 043f920..dcd53d6 100644 --- a/test/repositories/deploy_keys_test.exs +++ b/test/repositories/deploy_keys_test.exs @@ -26,7 +26,9 @@ defmodule Tentacat.Repositories.DeployKeysTest do test "create/4" do use_cassette "repositories/deploy_keys#create" do - key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCc72ESoMRGBQJBjnUUSNo1uoRnV7PI82KtqfSLjcmj3fUB0OvVx8haMhtb7hlxKb5J7J2vLNONyRgNryUkOFTwfHpCt0TZqCKMvp9AuYyAQH2E1kbIGPQ/6BTCktGXq200Ua2hM5NNZjuCgxgMNoyxMzoSb5qChCXatQLIzbODBhyMEPwUq3PqAieirCEPIjXRr2jEAR9+xL8UnHb2e3ZcjuqZPB+yiZZSzZA5IDs3zW7RBQB6ZLoIInUWRxR41YE/2gNeUe4FwhXfxXane/4zkiNqqClE2rDo25MocVpqzP8niVuwQYPYsxEGOo/RIaQa55wvD/LMIwEaOVdbnRl7" + key = + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCc72ESoMRGBQJBjnUUSNo1uoRnV7PI82KtqfSLjcmj3fUB0OvVx8haMhtb7hlxKb5J7J2vLNONyRgNryUkOFTwfHpCt0TZqCKMvp9AuYyAQH2E1kbIGPQ/6BTCktGXq200Ua2hM5NNZjuCgxgMNoyxMzoSb5qChCXatQLIzbODBhyMEPwUq3PqAieirCEPIjXRr2jEAR9+xL8UnHb2e3ZcjuqZPB+yiZZSzZA5IDs3zW7RBQB6ZLoIInUWRxR41YE/2gNeUe4FwhXfxXane/4zkiNqqClE2rDo25MocVpqzP8niVuwQYPYsxEGOo/RIaQa55wvD/LMIwEaOVdbnRl7" + body = %{ "title" => "test_key", "read_only" => true, From c5c0e8a809927a5a6d4da87ccaa7d0508aeb92f5 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 15:44:23 +0200 Subject: [PATCH 3/9] replace JSX with Jason --- lib/tentacat.ex | 11 ++++++----- test/tentacat_test.exs | 13 +++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/tentacat.ex b/lib/tentacat.ex index 8f953e0..bb73ef3 100644 --- a/lib/tentacat.ex +++ b/lib/tentacat.ex @@ -1,11 +1,12 @@ defmodule Tentacat do use HTTPoison.Base alias Tentacat.Client + alias Jason @user_agent [{"User-agent", "tentacat"}] @type response :: - {:ok, :jsx.json_term(), HTTPoison.Response.t()} + {:ok, term, HTTPoison.Response.t()} | {integer, any, HTTPoison.Response.t()} | pagination_response @@ -13,7 +14,7 @@ defmodule Tentacat do @spec process_response_body(binary) :: term def process_response_body(""), do: nil - def process_response_body(body), do: JSX.decode!(body, deserialization_options()) + def process_response_body(body), do: Jason.decode!(body, deserialization_options()) @spec process_response(HTTPoison.Response.t() | {integer, any, HTTPoison.Response.t()}) :: response @@ -85,7 +86,7 @@ defmodule Tentacat do @spec json_request(atom, binary, any, keyword, keyword) :: response def json_request(method, url, body \\ "", headers \\ [], options \\ []) do - raw_request(method, url, JSX.encode!(body), headers, options) + raw_request(method, url, Jason.encode!(body), headers, options) end defp extra_options do @@ -114,7 +115,7 @@ defmodule Tentacat do @spec request_stream(atom, binary, Client.auth(), any, :one_page | nil | :stream) :: Enumerable.t() | response def request_stream(method, url, auth, body \\ "", override \\ nil) do - request_with_pagination(method, url, auth, JSX.encode!(body)) + request_with_pagination(method, url, auth, Jason.encode!(body)) |> stream_if_needed(override) end @@ -154,7 +155,7 @@ defmodule Tentacat do request!( method, url, - JSX.encode!(body), + Jason.encode!(body), authorization_header(auth, extra_headers() ++ @user_agent), extra_options() ) diff --git a/test/tentacat_test.exs b/test/tentacat_test.exs index 3480e75..1ec5f76 100644 --- a/test/tentacat_test.exs +++ b/test/tentacat_test.exs @@ -1,14 +1,15 @@ defmodule TentacatTest do use ExUnit.Case import Tentacat + alias Jason doctest Tentacat setup_all do - :meck.new(JSX, [:no_link]) + :meck.new(Jason, [:no_link]) on_exit(fn -> - :meck.unload(JSX) + :meck.unload(Jason) end) end @@ -41,14 +42,14 @@ defmodule TentacatTest do assert {200, "json", _} = process_response(%HTTPoison.Response{status_code: 200, headers: %{}, body: "json"}) - assert :meck.validate(JSX) + assert :meck.validate(Jason) end test "process response on a non-200 response" do assert {404, "json", _} = process_response(%HTTPoison.Response{status_code: 404, headers: %{}, body: "json"}) - assert :meck.validate(JSX) + assert :meck.validate(Jason) end test "process_response_body with an empty body" do @@ -56,7 +57,7 @@ defmodule TentacatTest do end test "process_response_body with content" do - :meck.expect(JSX, :decode!, 2, :decoded_json) + :meck.expect(Jason, :decode!, 2, :decoded_json) assert process_response_body("json") == :decoded_json end @@ -64,7 +65,7 @@ defmodule TentacatTest do test "process_response_body with serialization options" do Application.put_env(:tentacat, :deserialization_options, keys: :atoms) - :meck.expect(JSX, :decode!, fn _, [keys: :atoms] -> :decoded_json end) + :meck.expect(Jason, :decode!, fn _, [keys: :atoms] -> :decoded_json end) assert process_response_body("json") == :decoded_json end From 6f86180cfa37f8a5cd1a1068958a00acc7297ce3 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:32:26 +0200 Subject: [PATCH 4/9] implement Jason encoder for Tuple --- lib/tentacat.ex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tentacat.ex b/lib/tentacat.ex index bb73ef3..a97b294 100644 --- a/lib/tentacat.ex +++ b/lib/tentacat.ex @@ -12,6 +12,14 @@ defmodule Tentacat do @type pagination_response :: {response, binary | nil, Client.auth()} + defimpl Jason.Encoder, for: Tuple do + def encode(tuple, opts) when is_tuple(tuple) do + [tuple] + |> Enum.into(%{}) + |> Jason.Encode.map(opts) + end + end + @spec process_response_body(binary) :: term def process_response_body(""), do: nil def process_response_body(body), do: Jason.decode!(body, deserialization_options()) From 7be9d31b7d79ac7012b16742c1bf7b1fe8c587ea Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:33:36 +0200 Subject: [PATCH 5/9] update Gist fixtures --- test/fixture/vcr_cassettes/gists#fork.json | 2 +- test/fixture/vcr_cassettes/gists#get_revision.json | 4 ++-- test/fixture/vcr_cassettes/gists#gist_get.json | 2 +- test/fixture/vcr_cassettes/gists#list_commits.json | 2 +- test/fixture/vcr_cassettes/gists#list_forks.json | 2 +- test/fixture/vcr_cassettes/gists#list_public.json | 2 +- test/fixture/vcr_cassettes/gists#list_public_with_params.json | 2 +- test/fixture/vcr_cassettes/gists#list_starred.json | 2 +- test/fixture/vcr_cassettes/gists#list_users.json | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/fixture/vcr_cassettes/gists#fork.json b/test/fixture/vcr_cassettes/gists#fork.json index aef0a0b..2f20007 100644 --- a/test/fixture/vcr_cassettes/gists#fork.json +++ b/test/fixture/vcr_cassettes/gists#fork.json @@ -12,7 +12,7 @@ "url": "https://api.github.com/gists/0feff8bfe771b85ee0c3840afd78d177/forks" }, "response": { - "body": "{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false}", + "body": "{\"comments\":0,\"comments_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\"commits_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\"created_at\":\"2010-04-14T02:15:15Z\",\"description\":\"Hello World Examples\",\"files\":{\"hello_world.rb\":{\"filename\":\"hello_world.rb\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":167,\"type\":\"application/x-ruby\"}},\"forks_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\"git_pull_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"git_push_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"html_url\":\"https://gist.github.com/aa5a315d61ae9438b18d\",\"id\":\"aa5a315d61ae9438b18d\",\"node_id\":\"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\"owner\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"public\":true,\"truncated\":false,\"updated_at\":\"2011-06-20T11:34:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d\",\"user\":null}", "headers": { "Server": "GitHub.com", "Date": "Thu, 10 Dec 2015 22:17:43 GMT", diff --git a/test/fixture/vcr_cassettes/gists#get_revision.json b/test/fixture/vcr_cassettes/gists#get_revision.json index 998f27c..4072bbf 100644 --- a/test/fixture/vcr_cassettes/gists#get_revision.json +++ b/test/fixture/vcr_cassettes/gists#get_revision.json @@ -9,10 +9,10 @@ "method": "get", "options": [], "request_body": "", - "url": "https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/0ba06a873509677ab40b8ed5575f249a55c6fc41" + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f" }, "response": { - "body": "{'url':'https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/0ba06a873509677ab40b8ed5575f249a55c6fc41','forks_url':'https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/forks','commits_url':'https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/commits','id':'fe771b85eeeff878d177b0c0f3840afd','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/fe771b85eeeff878d177b0c0f3840afd.git','git_push_url':'https://gist.github.com/fe771b85eeeff878d177b0c0f3840afd.git','html_url':'https://gist.github.com/fe771b85eeeff878d177b0c0f3840afd','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167,'truncated':false,'content':''},'hello_world.py':{'filename':'hello_world.py','type':'application/x-python','language':'Python','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py','size':199,'truncated':false,'content':''},'hello_world_ruby.txt':{'filename':'hello_world_ruby.txt','type':'text/plain','language':'Text','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt','size':46,'truncated':false,'content':'Run `ruby hello_world.rb` to print Hello World'},'hello_world_python.txt':{'filename':'hello_world_python.txt','type':'text/plain','language':'Text','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt','size':48,'truncated':false,'content':'Run `python hello_world.py` to print Hello World'}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false,'forks':[{'user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'url':'https://api.github.com/gists/dee9c42e4998ce2ea439','id':'dee9c42e4998ce2ea439','created_at':'2011-04-14T16:00:49Z','updated_at':'2011-04-14T16:00:49Z'}],'history':[{'url':'https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd/0ba06a873509677ab40b8ed5575f249a55c6fc41','version':'0ba06a873509677ab40b8ed5575f249a55c6fc41','user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'change_status':{'deletions':0,'additions':180,'total':180},'committed_at':'2010-04-14T02:15:15Z'}]}", + "body": "{\"comments\":0,\"comments_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\"commits_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\"created_at\":\"2010-04-14T02:15:15Z\",\"description\":\"Hello World Examples\",\"files\":{\"hello_world_python.txt\":{\"content\":\"Run `python hello_world.py` to print Hello World\",\"filename\":\"hello_world_python.txt\",\"language\":\"Text\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt\",\"size\":48,\"truncated\":false,\"type\":\"text/plain\"},\"hello_world_ruby.txt\":{\"content\":\"Run `ruby hello_world.rb` to print Hello World\",\"filename\":\"hello_world_ruby.txt\",\"language\":\"Text\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt\",\"size\":46,\"truncated\":false,\"type\":\"text/plain\"},\"hello_world.py\":{\"content\":\"class HelloWorld:\\n\\n def __init__(self, name):\\n self.name = name.capitalize()\\n \\n def sayHi(self):\\n print \\\"Hello \\\" + self.name + \\\"!\\\"\\n\\nhello = HelloWorld(\\\"world\\\")\\nhello.sayHi()\",\"filename\":\"hello_world.py\",\"language\":\"Python\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py\",\"size\":199,\"truncated\":false,\"type\":\"application/x-python\"},\"hello_world.rb\":{\"content\":\"class HelloWorld\\n def initialize(name)\\n @name = name.capitalize\\n end\\n def sayHi\\n puts \\\"Hello !\\\"\\n end\\nend\\n\\nhello = HelloWorld.new(\\\"World\\\")\\nhello.sayHi\",\"filename\":\"hello_world.rb\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":167,\"truncated\":false,\"type\":\"application/x-ruby\"}},\"forks_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\"git_pull_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"git_push_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"html_url\":\"https://gist.github.com/aa5a315d61ae9438b18d\",\"id\":\"aa5a315d61ae9438b18d\",\"node_id\":\"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\"owner\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"public\":true,\"updated_at\":\"2011-06-20T11:34:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\"user\":null, \"forks\":[{\"created_at\":\"2011-04-14T16:00:49Z\",\"id\":\"dee9c42e4998ce2ea439\",\"updated_at\":\"2011-04-14T16:00:49Z\",\"url\":\"https://api.github.com/gists/dee9c42e4998ce2ea439\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"}}],\"history\":[{\"change_status\":{\"additions\":180,\"deletions\":0,\"total\":180},\"committed_at\":\"2010-04-14T02:15:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"version\":\"57a7f021a713b1c5a6a199b54cc514735d2d462f\"}],\"truncated\":false}", "headers": { "Server": "GitHub.com", "Date": "Sun, 20 Dec 2015 17:40:43 GMT", diff --git a/test/fixture/vcr_cassettes/gists#gist_get.json b/test/fixture/vcr_cassettes/gists#gist_get.json index b749d51..eee9757 100644 --- a/test/fixture/vcr_cassettes/gists#gist_get.json +++ b/test/fixture/vcr_cassettes/gists#gist_get.json @@ -12,7 +12,7 @@ "url": "https://api.github.com/gists/fe771b85eeeff878d177b0c0f3840afd" }, "response": { - "body": "{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167,'truncated':false,'content':''},'hello_world.py':{'filename':'hello_world.py','type':'application/x-python','language':'Python','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py','size':199,'truncated':false,'content':''},'hello_world_ruby.txt':{'filename':'hello_world_ruby.txt','type':'text/plain','language':'Text','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt','size':46,'truncated':false,'content':'Run `ruby hello_world.rb` to print Hello World'},'hello_world_python.txt':{'filename':'hello_world_python.txt','type':'text/plain','language':'Text','raw_url':'https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt','size':48,'truncated':false,'content':'Run `python hello_world.py` to print Hello World'}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false,'forks':[{'user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'url':'https://api.github.com/gists/dee9c42e4998ce2ea439','id':'dee9c42e4998ce2ea439','created_at':'2011-04-14T16:00:49Z','updated_at':'2011-04-14T16:00:49Z'}],'history':[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f','version':'57a7f021a713b1c5a6a199b54cc514735d2d462f','user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'change_status':{'deletions':0,'additions':180,'total':180},'committed_at':'2010-04-14T02:15:15Z'}]}", + "body": "{\"comments\":0,\"comments_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\"commits_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\"created_at\":\"2010-04-14T02:15:15Z\",\"description\":\"Hello World Examples\",\"files\":{\"hello_world_python.txt\":{\"content\":\"Run `python hello_world.py` to print Hello World\",\"filename\":\"hello_world_python.txt\",\"language\":\"Text\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/076b4b78c10c9b7e1e0b73ffb99631bfc948de3b/hello_world_python.txt\",\"size\":48,\"truncated\":false,\"type\":\"text/plain\"},\"hello_world_ruby.txt\":{\"content\":\"Run `ruby hello_world.rb` to print Hello World\",\"filename\":\"hello_world_ruby.txt\",\"language\":\"Text\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/9e4544db60e01a261aac098592b11333704e9082/hello_world_ruby.txt\",\"size\":46,\"truncated\":false,\"type\":\"text/plain\"},\"hello_world.py\":{\"content\":\"class HelloWorld:\\n\\n def __init__(self, name):\\n self.name = name.capitalize()\\n \\n def sayHi(self):\\n print \\\"Hello \\\" + self.name + \\\"!\\\"\\n\\nhello = HelloWorld(\\\"world\\\")\\nhello.sayHi()\",\"filename\":\"hello_world.py\",\"language\":\"Python\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/e29f3839074953e1cc2934867fa5f2d2/raw/99c1bf3a345505c2e6195198d5f8c36267de570b/hello_world.py\",\"size\":199,\"truncated\":false,\"type\":\"application/x-python\"},\"hello_world.rb\":{\"content\":\"class HelloWorld\\n def initialize(name)\\n @name = name.capitalize\\n end\\n def sayHi\\n puts \\\"Hello !\\\"\\n end\\nend\\n\\nhello = HelloWorld.new(\\\"World\\\")\\nhello.sayHi\",\"filename\":\"hello_world.rb\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":167,\"truncated\":false,\"type\":\"application/x-ruby\"}},\"forks_url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\"git_pull_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"git_push_url\":\"https://gist.github.com/aa5a315d61ae9438b18d.git\",\"html_url\":\"https://gist.github.com/aa5a315d61ae9438b18d\",\"id\":\"aa5a315d61ae9438b18d\",\"node_id\":\"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\"owner\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"public\":true,\"updated_at\":\"2011-06-20T11:34:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d\",\"user\":null, \"forks\":[{\"created_at\":\"2011-04-14T16:00:49Z\",\"id\":\"dee9c42e4998ce2ea439\",\"updated_at\":\"2011-04-14T16:00:49Z\",\"url\":\"https://api.github.com/gists/dee9c42e4998ce2ea439\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"}}],\"history\":[{\"change_status\":{\"additions\":180,\"deletions\":0,\"total\":180},\"committed_at\":\"2010-04-14T02:15:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"version\":\"57a7f021a713b1c5a6a199b54cc514735d2d462f\"}],\"truncated\":false}", "headers": { "Server": "GitHub.com", "Date": "Sun, 20 Dec 2015 17:40:43 GMT", diff --git a/test/fixture/vcr_cassettes/gists#list_commits.json b/test/fixture/vcr_cassettes/gists#list_commits.json index 4f8c92a..ac34381 100644 --- a/test/fixture/vcr_cassettes/gists#list_commits.json +++ b/test/fixture/vcr_cassettes/gists#list_commits.json @@ -12,7 +12,7 @@ "url": "https://api.github.com/gists/0feff8bfe771b85ee0c3840afd78d177/commits" }, "response": { - "body": "[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f','version':'57a7f021a713b1c5a6a199b54cc514735d2d462f','user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'change_status':{'deletions':0,'additions':180,'total':180},'committed_at':'2010-04-14T02:15:15Z'}]", + "body": "[{\"change_status\":{\"additions\":180,\"deletions\":0,\"total\":180},\"committed_at\":\"2010-04-14T02:15:15Z\",\"url\":\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"},\"version\":\"57a7f021a713b1c5a6a199b54cc514735d2d462f\"}]", "headers": { "Server": "GitHub.com", "Date": "Thu, 10 Dec 2015 22:17:43 GMT", diff --git a/test/fixture/vcr_cassettes/gists#list_forks.json b/test/fixture/vcr_cassettes/gists#list_forks.json index a3a597f..5d0bfe3 100644 --- a/test/fixture/vcr_cassettes/gists#list_forks.json +++ b/test/fixture/vcr_cassettes/gists#list_forks.json @@ -12,7 +12,7 @@ "url": "https://api.github.com/gists/0feff8bfe771b85ee0c3840afd78d177/forks" }, "response": { - "body": "[{'user':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'url':'https://api.github.com/gists/dee9c42e4998ce2ea439','id':'dee9c42e4998ce2ea439','created_at':'2011-04-14T16:00:49Z','updated_at':'2011-04-14T16:00:49Z'}]", + "body": "[{\"created_at\":\"2011-04-14T16:00:49Z\",\"id\":\"dee9c42e4998ce2ea439\",\"updated_at\":\"2011-04-14T16:00:49Z\",\"url\":\"https://api.github.com/gists/dee9c42e4998ce2ea439\",\"user\":{\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"gravatar_id\":\"\",\"html_url\":\"https://github.com/octocat\",\"id\":1,\"login\":\"octocat\",\"node_id\":\"MDQ6VXNlcjE=\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"site_admin\":false,\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"type\":\"User\",\"url\":\"https://api.github.com/users/octocat\"}}]", "headers": { "Server": "GitHub.com", "Date": "Thu, 10 Dec 2015 22:17:43 GMT", diff --git a/test/fixture/vcr_cassettes/gists#list_public.json b/test/fixture/vcr_cassettes/gists#list_public.json index f88a323..f928499 100644 --- a/test/fixture/vcr_cassettes/gists#list_public.json +++ b/test/fixture/vcr_cassettes/gists#list_public.json @@ -14,7 +14,7 @@ }, "response": { "binary": false, - "body": "[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false}]", + "body": "[{\"url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae\",\"forks_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/forks\",\"commits_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/commits\",\"id\":\"6cad326836d38bd3a7ae\",\"node_id\":\"MDQ6R2lzdDZjYWQzMjY4MzZkMzhiZDNhN2Fl\",\"git_pull_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"git_push_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"html_url\":\"https://gist.github.com/6cad326836d38bd3a7ae\",\"files\":{\"hello_world.rb\":{\"filename\":\"hello_world.rb\",\"type\":\"application/x-ruby\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":175}},\"public\":true,\"created_at\":\"2014-10-01T16:19:34Z\",\"updated_at\":\"2020-04-24T03:17:31Z\",\"description\":\"Hello world!\",\"comments\":253,\"user\":null,\"comments_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/comments\",\"owner\":{\"login\":\"octocat\",\"id\":583231,\"node_id\":\"MDQ6VXNlcjU4MzIzMQ==\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/583231?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false},\"truncated\":false}]", "headers": { "Date": "Sun, 15 Sep 2019 17:19:17 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/test/fixture/vcr_cassettes/gists#list_public_with_params.json b/test/fixture/vcr_cassettes/gists#list_public_with_params.json index 21d16f8..0618fee 100644 --- a/test/fixture/vcr_cassettes/gists#list_public_with_params.json +++ b/test/fixture/vcr_cassettes/gists#list_public_with_params.json @@ -14,7 +14,7 @@ }, "response": { "binary": false, - "body": "[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false}]", + "body": "[{\"url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae\",\"forks_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/forks\",\"commits_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/commits\",\"id\":\"6cad326836d38bd3a7ae\",\"node_id\":\"MDQ6R2lzdDZjYWQzMjY4MzZkMzhiZDNhN2Fl\",\"git_pull_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"git_push_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"html_url\":\"https://gist.github.com/6cad326836d38bd3a7ae\",\"files\":{\"hello_world.rb\":{\"filename\":\"hello_world.rb\",\"type\":\"application/x-ruby\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":175}},\"public\":true,\"created_at\":\"2014-10-01T16:19:34Z\",\"updated_at\":\"2020-04-24T03:17:31Z\",\"description\":\"Hello world!\",\"comments\":253,\"user\":null,\"comments_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/comments\",\"owner\":{\"login\":\"octocat\",\"id\":583231,\"node_id\":\"MDQ6VXNlcjU4MzIzMQ==\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/583231?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false},\"truncated\":false}]", "headers": { "Date": "Sun, 15 Sep 2019 17:19:17 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/test/fixture/vcr_cassettes/gists#list_starred.json b/test/fixture/vcr_cassettes/gists#list_starred.json index 4408b51..203e45c 100644 --- a/test/fixture/vcr_cassettes/gists#list_starred.json +++ b/test/fixture/vcr_cassettes/gists#list_starred.json @@ -14,7 +14,7 @@ }, "response": { "binary": false, - "body": "[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false}]", + "body": "[{\"url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae\",\"forks_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/forks\",\"commits_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/commits\",\"id\":\"6cad326836d38bd3a7ae\",\"node_id\":\"MDQ6R2lzdDZjYWQzMjY4MzZkMzhiZDNhN2Fl\",\"git_pull_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"git_push_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"html_url\":\"https://gist.github.com/6cad326836d38bd3a7ae\",\"files\":{\"hello_world.rb\":{\"filename\":\"hello_world.rb\",\"type\":\"application/x-ruby\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":175}},\"public\":true,\"created_at\":\"2014-10-01T16:19:34Z\",\"updated_at\":\"2020-04-24T03:17:31Z\",\"description\":\"Hello world!\",\"comments\":253,\"user\":null,\"comments_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/comments\",\"owner\":{\"login\":\"octocat\",\"id\":583231,\"node_id\":\"MDQ6VXNlcjU4MzIzMQ==\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/583231?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false},\"truncated\":false}]", "headers": { "Date": "Sun, 15 Sep 2019 17:19:17 GMT", "Content-Type": "application/json; charset=utf-8", diff --git a/test/fixture/vcr_cassettes/gists#list_users.json b/test/fixture/vcr_cassettes/gists#list_users.json index e04c640..42cba46 100644 --- a/test/fixture/vcr_cassettes/gists#list_users.json +++ b/test/fixture/vcr_cassettes/gists#list_users.json @@ -14,7 +14,7 @@ }, "response": { "binary": false, - "body": "[{'url':'https://api.github.com/gists/aa5a315d61ae9438b18d','forks_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/forks','commits_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/commits','id':'aa5a315d61ae9438b18d','node_id':'MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk','git_pull_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','git_push_url':'https://gist.github.com/aa5a315d61ae9438b18d.git','html_url':'https://gist.github.com/aa5a315d61ae9438b18d','files':{'hello_world.rb':{'filename':'hello_world.rb','type':'application/x-ruby','language':'Ruby','raw_url':'https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb','size':167}},'public':true,'created_at':'2010-04-14T02:15:15Z','updated_at':'2011-06-20T11:34:15Z','description':'Hello World Examples','comments':0,'user':null,'comments_url':'https://api.github.com/gists/aa5a315d61ae9438b18d/comments/','owner':{'login':'octocat','id':1,'node_id':'MDQ6VXNlcjE=','avatar_url':'https://github.com/images/error/octocat_happy.gif','gravatar_id':'','url':'https://api.github.com/users/octocat','html_url':'https://github.com/octocat','followers_url':'https://api.github.com/users/octocat/followers','following_url':'https://api.github.com/users/octocat/following{/other_user}','gists_url':'https://api.github.com/users/octocat/gists{/gist_id}','starred_url':'https://api.github.com/users/octocat/starred{/owner}{/repo}','subscriptions_url':'https://api.github.com/users/octocat/subscriptions','organizations_url':'https://api.github.com/users/octocat/orgs','repos_url':'https://api.github.com/users/octocat/repos','events_url':'https://api.github.com/users/octocat/events{/privacy}','received_events_url':'https://api.github.com/users/octocat/received_events','type':'User','site_admin':false},'truncated':false}]", + "body": "[{\"url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae\",\"forks_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/forks\",\"commits_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/commits\",\"id\":\"6cad326836d38bd3a7ae\",\"node_id\":\"MDQ6R2lzdDZjYWQzMjY4MzZkMzhiZDNhN2Fl\",\"git_pull_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"git_push_url\":\"https://gist.github.com/6cad326836d38bd3a7ae.git\",\"html_url\":\"https://gist.github.com/6cad326836d38bd3a7ae\",\"files\":{\"hello_world.rb\":{\"filename\":\"hello_world.rb\",\"type\":\"application/x-ruby\",\"language\":\"Ruby\",\"raw_url\":\"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\"size\":175}},\"public\":true,\"created_at\":\"2014-10-01T16:19:34Z\",\"updated_at\":\"2020-04-24T03:17:31Z\",\"description\":\"Hello world!\",\"comments\":253,\"user\":null,\"comments_url\":\"https://api.github.com/gists/6cad326836d38bd3a7ae/comments\",\"owner\":{\"login\":\"octocat\",\"id\":583231,\"node_id\":\"MDQ6VXNlcjU4MzIzMQ==\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/583231?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false},\"truncated\":false}]", "headers": { "Date": "Sun, 15 Sep 2019 17:19:17 GMT", "Content-Type": "application/json; charset=utf-8", From c0b6f415412d3318c19ad73bab0e26e62a075184 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:33:52 +0200 Subject: [PATCH 6/9] fix Gist tests --- test/gists_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/gists_test.exs b/test/gists_test.exs index 5817f0e..5c2baf7 100644 --- a/test/gists_test.exs +++ b/test/gists_test.exs @@ -20,7 +20,7 @@ defmodule Tentacat.GistsTest do test "list_users/2" do use_cassette "gists#list_users" do {_, [%{"description" => description}], _} = list_users(@client, "octocat") - assert description == "Hello World Examples" + assert description == "Hello world!" end end @@ -53,8 +53,8 @@ defmodule Tentacat.GistsTest do test "get_revision/2" do use_cassette "gists#get_revision" do - gist_id = "fe771b85eeeff878d177b0c0f3840afd" - revision_sha = "0ba06a873509677ab40b8ed5575f249a55c6fc41" + gist_id = "aa5a315d61ae9438b18d" + revision_sha = "57a7f021a713b1c5a6a199b54cc514735d2d462f" {status_code, %{"url" => url}, _} = get_revision(gist_id, revision_sha) assert url == "https://api.github.com/gists/#{gist_id}/#{revision_sha}" assert status_code == 200 From 59b55a80a1916e927a5e084d0842409a34bf3ad8 Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:40:31 +0200 Subject: [PATCH 7/9] remove exjsx from mix.exs deps --- mix.exs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index 6acbb1b..d724ae4 100644 --- a/mix.exs +++ b/mix.exs @@ -31,13 +31,12 @@ defmodule Tentacat.Mixfile do end def application do - [applications: [:httpoison, :exjsx]] + [applications: [:httpoison]] end defp deps do [ {:httpoison, "~> 1.0"}, - {:exjsx, "~> 4.0"}, {:jason, "~> 1.2"}, {:earmark, "~> 1.2", only: :dev}, {:ex_doc, "~> 0.19", only: :dev}, From 407016c314474b7285b02344ec34c3ad7b2fc91d Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:48:00 +0200 Subject: [PATCH 8/9] update README and Getting Started --- README.md | 4 ++-- guides/Getting Started.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a580693..7e050b1 100644 --- a/README.md +++ b/README.md @@ -214,10 +214,10 @@ using: ```elixir # To have Atom keys -config :tentacat, :deserialization_options, [labels: :atoms] +config :tentacat, :deserialization_options, [keys: :atoms] ``` -See: https://github.com/talentdeficit/exjsx#decodejson-opts for available options. +See: https://hexdocs.pm/jason/Jason.html#decode/2-options for available options. ## Contributing diff --git a/guides/Getting Started.md b/guides/Getting Started.md index 030dda2..81bc236 100644 --- a/guides/Getting Started.md +++ b/guides/Getting Started.md @@ -40,7 +40,7 @@ config :tentacat, request_options: [] ``` -* `:deserialization_options`: List of options to be passed through `JSX.decode!/2` to `:jsx`. See [the :jsx documentation](https://github.com/talentdeficit/exjsx#decodejson-opts) for more information. +* `:deserialization_options`: List of options to be passed through `Jason.decode!/2`. See [the Jason documentation](https://hexdocs.pm/jason/Jason.html#decode/2-options) for more information. * `:extra_headers`: List of two-element tuples defining additional HTTP headers for `HTTPoison.request/5`. For alternative ways of specifying headers, see `t:HTTPoison.Base.headers/0`. * `:pagination`: Specifies the default method of pagination (can also be set on a per-request basis). See `Tentacat.get/4` for more information. * `:request_options`: Keyword list of options to be passed to `HTTPoison.request/5`. From 31ac0106d827148208336d5a3cedba10d6a28fcd Mon Sep 17 00:00:00 2001 From: nkls Date: Thu, 30 Apr 2020 20:59:23 +0200 Subject: [PATCH 9/9] remove last remaining reference to JSX --- test/fixture/vcr_cassettes/search#issues.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixture/vcr_cassettes/search#issues.json b/test/fixture/vcr_cassettes/search#issues.json index b19c347..fe1b87e 100644 --- a/test/fixture/vcr_cassettes/search#issues.json +++ b/test/fixture/vcr_cassettes/search#issues.json @@ -12,7 +12,7 @@ }, "response": { "binary": false, - "body": "{\"total_count\":16,\"incomplete_results\":false,\"items\":[{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/84\",\"id\":154776454,\"node_id\":\"MDU6SXNzdWUxNTQ3NzY0NTQ=\",\"number\":84,\"title\":\"Github rate limit\",\"user\":{\"login\":\"mgwidmann\",\"id\":5035724,\"node_id\":\"MDQ6VXNlcjUwMzU3MjQ=\",\"avatar_url\":\"https://avatars1.githubusercontent.com/u/5035724?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mgwidmann\",\"html_url\":\"https://github.com/mgwidmann\",\"followers_url\":\"https://api.github.com/users/mgwidmann/followers\",\"following_url\":\"https://api.github.com/users/mgwidmann/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mgwidmann/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mgwidmann/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mgwidmann/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mgwidmann/orgs\",\"repos_url\":\"https://api.github.com/users/mgwidmann/repos\",\"events_url\":\"https://api.github.com/users/mgwidmann/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mgwidmann/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":12,\"created_at\":\"2016-05-13T18:45:41Z\",\"updated_at\":\"2017-11-28T22:48:07Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Currently theres no handling of the rate limit in this project. I regularly hit the rate limit (usually at the end of the hour) and would like to hear your thoughts on how to handle this properly.\\n\\nHeres the exception I get when that happens:\\n\\n```\\n[error] Task #PID<0.516.0> started from #PID<0.515.0> terminating\\n** (FunctionClauseError) no function clause matching in Tentacat.process_stream/1\\n lib/tentacat.ex:102: Tentacat.process_stream({403, %{\\\"documentation_url\\\" => \\\"https://developer.github.com/v3/#rate-limiting\\\", \\\"message\\\" => \\\"API rate limit exceeded for mgwidmann.\\\"}})\\n (elixir) lib/stream.ex:1099: Stream.do_resource/5\\n (elixir) lib/enum.ex:1486: Enum.reduce/3\\n (elixir) lib/enum.ex:2248: Enum.to_list/1\\n```\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/95\",\"id\":176103956,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0ODQ3MTUxNDE=\",\"number\":95,\"title\":\"readme\",\"user\":{\"login\":\"polymetis\",\"id\":1136430,\"node_id\":\"MDQ6VXNlcjExMzY0MzA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/1136430?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/polymetis\",\"html_url\":\"https://github.com/polymetis\",\"followers_url\":\"https://api.github.com/users/polymetis/followers\",\"following_url\":\"https://api.github.com/users/polymetis/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/polymetis/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/polymetis/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/polymetis/subscriptions\",\"organizations_url\":\"https://api.github.com/users/polymetis/orgs\",\"repos_url\":\"https://api.github.com/users/polymetis/repos\",\"events_url\":\"https://api.github.com/users/polymetis/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/polymetis/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2016-09-09T20:37:31Z\",\"updated_at\":\"2016-09-11T22:34:55Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/95\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/95\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/95.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/95.patch\"},\"body\":\"Just added a readme function because I was floating about the code. \\n\\nhttps://developer.github.com/v3/repos/contents/#get-the-readme\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/72\",\"id\":147169427,\"node_id\":\"MDU6SXNzdWUxNDcxNjk0Mjc=\",\"number\":72,\"title\":\"Documentation doesn't mention you can pass parameters\",\"user\":{\"login\":\"2016rshah\",\"id\":6821244,\"node_id\":\"MDQ6VXNlcjY4MjEyNDQ=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/6821244?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/2016rshah\",\"html_url\":\"https://github.com/2016rshah\",\"followers_url\":\"https://api.github.com/users/2016rshah/followers\",\"following_url\":\"https://api.github.com/users/2016rshah/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/2016rshah/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/2016rshah/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/2016rshah/subscriptions\",\"organizations_url\":\"https://api.github.com/users/2016rshah/orgs\",\"repos_url\":\"https://api.github.com/users/2016rshah/repos\",\"events_url\":\"https://api.github.com/users/2016rshah/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/2016rshah/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2016-04-09T22:26:22Z\",\"updated_at\":\"2016-04-10T21:52:51Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"As you can see [here](https://github.com/edgurgel/tentacat/blob/master/lib/tentacat/repositories.ex#L25) the documentation doesn't mention you can pass in parameters like `[sort: \\\"pushed\\\"]` to the function even though that feature has already been implemented. \\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/78\",\"id\":151130683,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0Njc4ODI3MzQ=\",\"number\":78,\"title\":\"edit issues by https://developer.github.com/v3/issues/#edit-an-issue\",\"user\":{\"login\":\"zhongwencool\",\"id\":3116225,\"node_id\":\"MDQ6VXNlcjMxMTYyMjU=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/3116225?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/zhongwencool\",\"html_url\":\"https://github.com/zhongwencool\",\"followers_url\":\"https://api.github.com/users/zhongwencool/followers\",\"following_url\":\"https://api.github.com/users/zhongwencool/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/zhongwencool/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/zhongwencool/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/zhongwencool/subscriptions\",\"organizations_url\":\"https://api.github.com/users/zhongwencool/orgs\",\"repos_url\":\"https://api.github.com/users/zhongwencool/repos\",\"events_url\":\"https://api.github.com/users/zhongwencool/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/zhongwencool/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":2,\"created_at\":\"2016-04-26T13:11:06Z\",\"updated_at\":\"2016-04-26T16:33:53Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/78\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/78\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/78.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/78.patch\"},\"body\":\"\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/111\",\"id\":208578174,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0MTA2ODI2Nzk2\",\"number\":111,\"title\":\"Add support for notifications API\",\"user\":{\"login\":\"Baransu\",\"id\":9558691,\"node_id\":\"MDQ6VXNlcjk1NTg2OTE=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/9558691?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/Baransu\",\"html_url\":\"https://github.com/Baransu\",\"followers_url\":\"https://api.github.com/users/Baransu/followers\",\"following_url\":\"https://api.github.com/users/Baransu/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/Baransu/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/Baransu/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/Baransu/subscriptions\",\"organizations_url\":\"https://api.github.com/users/Baransu/orgs\",\"repos_url\":\"https://api.github.com/users/Baransu/repos\",\"events_url\":\"https://api.github.com/users/Baransu/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/Baransu/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2017-02-17T22:46:20Z\",\"updated_at\":\"2017-03-26T11:52:46Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/111\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/111\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/111.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/111.patch\"},\"body\":\"I found that notifications is not covered in this library so I've added functions cover this part of API.\\r\\n\\r\\nI've also tried to add tests to every new function but in seems that token yourtokencomeshere\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/96\",\"id\":176381918,\"node_id\":\"MDU6SXNzdWUxNzYzODE5MTg=\",\"number\":96,\"title\":\"Support for .diff and .patch mediatypes\",\"user\":{\"login\":\"smetana\",\"id\":5590,\"node_id\":\"MDQ6VXNlcjU1OTA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/5590?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/smetana\",\"html_url\":\"https://github.com/smetana\",\"followers_url\":\"https://api.github.com/users/smetana/followers\",\"following_url\":\"https://api.github.com/users/smetana/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/smetana/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/smetana/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/smetana/subscriptions\",\"organizations_url\":\"https://api.github.com/users/smetana/orgs\",\"repos_url\":\"https://api.github.com/users/smetana/repos\",\"events_url\":\"https://api.github.com/users/smetana/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/smetana/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":2,\"created_at\":\"2016-09-12T13:57:03Z\",\"updated_at\":\"2017-02-16T11:31:43Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"GitHub API allows to set Accept header to application/vnd.github.v3.diff and application/vnd.github.v3.patch to return raw diffs and patches. This raises error in Tentacat because response body is always processed by JSX.decode!. Even if it is not json\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/2\",\"id\":15853488,\"node_id\":\"MDU6SXNzdWUxNTg1MzQ4OA==\",\"number\":2,\"title\":\"Tentacat Logo/Mascott\",\"user\":{\"login\":\"edgurgel\",\"id\":30873,\"node_id\":\"MDQ6VXNlcjMwODcz\",\"avatar_url\":\"https://avatars0.githubusercontent.com/u/30873?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/edgurgel\",\"html_url\":\"https://github.com/edgurgel\",\"followers_url\":\"https://api.github.com/users/edgurgel/followers\",\"following_url\":\"https://api.github.com/users/edgurgel/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/edgurgel/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/edgurgel/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/edgurgel/subscriptions\",\"organizations_url\":\"https://api.github.com/users/edgurgel/orgs\",\"repos_url\":\"https://api.github.com/users/edgurgel/repos\",\"events_url\":\"https://api.github.com/users/edgurgel/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/edgurgel/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[{\"id\":43408683,\"node_id\":\"MDU6TGFiZWw0MzQwODY4Mw==\",\"url\":\"https://api.github.com/repos/edgurgel/tentacat/labels/enhancement\",\"name\":\"enhancement\",\"color\":\"84b6eb\",\"default\":true}],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2013-06-21T14:25:06Z\",\"updated_at\":\"2015-12-14T20:51:31Z\",\"closed_at\":null,\"author_association\":\"OWNER\",\"body\":\"We need a cool logo/mascott for Tentacat! @jugoncalves :question: \\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/135\",\"id\":277541753,\"node_id\":\"MDU6SXNzdWUyNzc1NDE3NTM=\",\"number\":135,\"title\":\"passing the etag in requests\",\"user\":{\"login\":\"bryanhuntesl\",\"id\":31992054,\"node_id\":\"MDQ6VXNlcjMxOTkyMDU0\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/31992054?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/bryanhuntesl\",\"html_url\":\"https://github.com/bryanhuntesl\",\"followers_url\":\"https://api.github.com/users/bryanhuntesl/followers\",\"following_url\":\"https://api.github.com/users/bryanhuntesl/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/bryanhuntesl/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/bryanhuntesl/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/bryanhuntesl/subscriptions\",\"organizations_url\":\"https://api.github.com/users/bryanhuntesl/orgs\",\"repos_url\":\"https://api.github.com/users/bryanhuntesl/repos\",\"events_url\":\"https://api.github.com/users/bryanhuntesl/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/bryanhuntesl/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2017-11-28T21:19:51Z\",\"updated_at\":\"2017-11-28T21:21:51Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Hi, I'm going to drop down to HTTPoison most likely for this, one optimization which can be made in any call is to pass the ETag from the previous invocation - if you do so, and nothing has changed, your rate limit remains unchanged. Could it be passed in the existing options block? \\r\\n\\r\\n\\\"ETag\\\", \\\"\\\\\\\"eaa46eb91c77ded86b4261245e49fbd5\\\\\\\"\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/144\",\"id\":315491184,\"node_id\":\"MDU6SXNzdWUzMTU0OTExODQ=\",\"number\":144,\"title\":\"0.9.0 API is inconsistent. Some requests still return body instead of tuple {code, body, response}\",\"user\":{\"login\":\"smetana\",\"id\":5590,\"node_id\":\"MDQ6VXNlcjU1OTA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/5590?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/smetana\",\"html_url\":\"https://github.com/smetana\",\"followers_url\":\"https://api.github.com/users/smetana/followers\",\"following_url\":\"https://api.github.com/users/smetana/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/smetana/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/smetana/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/smetana/subscriptions\",\"organizations_url\":\"https://api.github.com/users/smetana/orgs\",\"repos_url\":\"https://api.github.com/users/smetana/repos\",\"events_url\":\"https://api.github.com/users/smetana/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/smetana/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[{\"id\":43408681,\"node_id\":\"MDU6TGFiZWw0MzQwODY4MQ==\",\"url\":\"https://api.github.com/repos/edgurgel/tentacat/labels/bug\",\"name\":\"bug\",\"color\":\"fc2929\",\"default\":true}],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2018-04-18T13:56:30Z\",\"updated_at\":\"2018-04-18T22:49:30Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"```elixir\\r\\nTentacat.Organizations.list_mine(client) # returns tuple\\r\\nTentacat.Repositories.list_mine(client) # returns list\\r\\n```\\r\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/93\",\"id\":173455290,\"node_id\":\"MDU6SXNzdWUxNzM0NTUyOTA=\",\"number\":93,\"title\":\"support passing in params for Deployments.list method\",\"user\":{\"login\":\"batmany13\",\"id\":2660308,\"node_id\":\"MDQ6VXNlcjI2NjAzMDg=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/2660308?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/batmany13\",\"html_url\":\"https://github.com/batmany13\",\"followers_url\":\"https://api.github.com/users/batmany13/followers\",\"following_url\":\"https://api.github.com/users/batmany13/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/batmany13/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/batmany13/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/batmany13/subscriptions\",\"organizations_url\":\"https://api.github.com/users/batmany13/orgs\",\"repos_url\":\"https://api.github.com/users/batmany13/repos\",\"events_url\":\"https://api.github.com/users/batmany13/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/batmany13/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2016-08-26T13:39:16Z\",\"updated_at\":\"2016-12-18T23:16:24Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"Looking at GitHub's Deployments api [docs](https://developer.github.com/v3/repos/deployments/#create-a-deployment), it describes the ability to filter deployments by \\\"sha\\\", \\\"ref\\\", \\\"task\\\" and \\\"environment\\\". There doesn't seem to be the ability to pass in optional query params to the Tentacat.Repositories.Deployments.list call. This will be convenient, for instance, in the case of finding all deployments associated with a PR/sha value.\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/101\",\"id\":187885766,\"node_id\":\"MDU6SXNzdWUxODc4ODU3NjY=\",\"number\":101,\"title\":\"Add headers for text match?\",\"user\":{\"login\":\"mercul3s\",\"id\":2100610,\"node_id\":\"MDQ6VXNlcjIxMDA2MTA=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/2100610?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mercul3s\",\"html_url\":\"https://github.com/mercul3s\",\"followers_url\":\"https://api.github.com/users/mercul3s/followers\",\"following_url\":\"https://api.github.com/users/mercul3s/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mercul3s/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mercul3s/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mercul3s/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mercul3s/orgs\",\"repos_url\":\"https://api.github.com/users/mercul3s/repos\",\"events_url\":\"https://api.github.com/users/mercul3s/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mercul3s/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2016-11-08T02:28:57Z\",\"updated_at\":\"2016-11-08T02:28:57Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"I'm trying to use Github's metadata matching to return code snippets/highlights in the response, as documented in https://developer.github.com/v3/search/#text-match-metadata. I know that I can add my own headers in HTTPoison, ie\\r\\n```\\r\\nheader_list = Enum.to_list(headers)\\r\\n [{\\\"Accept\\\", \\\"application/vnd.github.v3.text-match+json\\\"} | header_list]\\r\\n```\\r\\nSo I can get back something like this:\\r\\n```\\r\\n...\\r\\n \\\"object_type\\\": \\\"FileContent\\\",\\r\\n \\\"property\\\": \\\"content\\\",\\r\\n \\\"fragment\\\": \\\"\\\\\\\",\\\\n \\\\\\\"key_limit\\\\\\\": 2,\\\\n \\\\\\\"owner\\\\\\\": {\\\\n \\\\\\\"email\\\",\\r\\n \\\"matches\\\": [\\r\\n {\\r\\n \\\"text\\\": \\\"key_limit\\\",\\r\\n \\\"indices\\\": [\\r\\n 16,\\r\\n 25\\r\\n ]\\r\\n\\t}\\r\\n...\\r\\n```\\r\\nIs there a way to pass the header info during the client creation? I tried something like the following, but no luck:\\r\\n```\\r\\nTentacat.Client.new(%{access_token: \\\"#{token}\\\", accept: \\\"application/vnd.github.v3.text-match+json\\\"}, \\\"#{@uri}\\\")\\r\\n```\\r\\nI also tried wrapping HTTPoison.base to pass the accept header, but I'm assuming that'll only work if I'm using all the HTTPoison base methods directly. Attempts to add text match as a header return results as a regular search api call. Any suggestions?\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/112\",\"id\":218698734,\"node_id\":\"MDU6SXNzdWUyMTg2OTg3MzQ=\",\"number\":112,\"title\":\"Projects support\",\"user\":{\"login\":\"AndrewDryga\",\"id\":1877644,\"node_id\":\"MDQ6VXNlcjE4Nzc2NDQ=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/1877644?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/AndrewDryga\",\"html_url\":\"https://github.com/AndrewDryga\",\"followers_url\":\"https://api.github.com/users/AndrewDryga/followers\",\"following_url\":\"https://api.github.com/users/AndrewDryga/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/AndrewDryga/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/AndrewDryga/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/AndrewDryga/subscriptions\",\"organizations_url\":\"https://api.github.com/users/AndrewDryga/orgs\",\"repos_url\":\"https://api.github.com/users/AndrewDryga/repos\",\"events_url\":\"https://api.github.com/users/AndrewDryga/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/AndrewDryga/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-04-01T14:20:19Z\",\"updated_at\":\"2017-04-01T14:20:19Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"It will be really nice to have one library that helps to automate Github Projects workflow (eg list labels and set correct workflow status in GitHub Projects).\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/128\",\"id\":271303127,\"node_id\":\"MDU6SXNzdWUyNzEzMDMxMjc=\",\"number\":128,\"title\":\"Feature request: Add Gist endpoint\",\"user\":{\"login\":\"DoumanAsh\",\"id\":5676053,\"node_id\":\"MDQ6VXNlcjU2NzYwNTM=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/5676053?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/DoumanAsh\",\"html_url\":\"https://github.com/DoumanAsh\",\"followers_url\":\"https://api.github.com/users/DoumanAsh/followers\",\"following_url\":\"https://api.github.com/users/DoumanAsh/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/DoumanAsh/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/DoumanAsh/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/DoumanAsh/subscriptions\",\"organizations_url\":\"https://api.github.com/users/DoumanAsh/orgs\",\"repos_url\":\"https://api.github.com/users/DoumanAsh/repos\",\"events_url\":\"https://api.github.com/users/DoumanAsh/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/DoumanAsh/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-11-05T18:40:12Z\",\"updated_at\":\"2017-11-05T18:40:12Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"Subj.\\r\\nReference https://developer.github.com/v3/gists/\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/141\",\"id\":302131791,\"node_id\":\"MDU6SXNzdWUzMDIxMzE3OTE=\",\"number\":141,\"title\":\"Feature request toggle 'watching' \",\"user\":{\"login\":\"bryanhuntesl\",\"id\":31992054,\"node_id\":\"MDQ6VXNlcjMxOTkyMDU0\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/31992054?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/bryanhuntesl\",\"html_url\":\"https://github.com/bryanhuntesl\",\"followers_url\":\"https://api.github.com/users/bryanhuntesl/followers\",\"following_url\":\"https://api.github.com/users/bryanhuntesl/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/bryanhuntesl/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/bryanhuntesl/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/bryanhuntesl/subscriptions\",\"organizations_url\":\"https://api.github.com/users/bryanhuntesl/orgs\",\"repos_url\":\"https://api.github.com/users/bryanhuntesl/repos\",\"events_url\":\"https://api.github.com/users/bryanhuntesl/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/bryanhuntesl/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2018-03-04T22:59:41Z\",\"updated_at\":\"2018-03-04T22:59:41Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"I've just implemented this in the python github client - this issue serves as a reminder to me, or anyone else who fancies a crack at it - to add this functionality to tentacat. \\r\\n\\r\\n## Subscribing to every public basho project on github\\r\\n\\r\\n[Link](https://github.com/PyGithub/PyGithub) to PyGithub/PyGithub project page \\r\\n\\r\\n[Commit](https://github.com/bryanhuntesl/PyGithub/commit/0d1104c9f7e5124db17dc186b350b1abb9dad270) which added and tested this functionality.\\r\\n\\r\\nInstall the feature version :\\r\\n\\r\\n```bash\\r\\npip install git+git://github.com/bryanhuntesl/PyGithub.git@esl-local-fix-watches \\r\\n```\\r\\n\\r\\nGrab a github token, set it as an environmental variable and run this snippet:\\r\\n\\r\\n```python\\r\\nfrom github import *\\r\\nimport os\\r\\ng = Github(login_or_token=os.getenv(\\\"GITHUB_TOKEN\\\"))\\r\\nu=g.get_user()\\r\\norg=g.get_organization(\\\"basho\\\")\\r\\nfor r in org.get_repos():\\r\\n u.add_to_watched(r)\\r\\n```\\r\\n\\r\\n### TADA \\r\\n\\r\\nNow you're subscribed to every currently public basho repository on github\\r\\n\\r\\n### Next \\r\\n\\r\\nPerform this same operation using [tentacat](https://github.com/edgurgel/tentacat).\\r\\n\\r\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/147\",\"id\":321125918,\"node_id\":\"MDU6SXNzdWUzMjExMjU5MTg=\",\"number\":147,\"title\":\"Add search/issues endpoint\",\"user\":{\"login\":\"Ryman\",\"id\":994978,\"node_id\":\"MDQ6VXNlcjk5NDk3OA==\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/994978?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/Ryman\",\"html_url\":\"https://github.com/Ryman\",\"followers_url\":\"https://api.github.com/users/Ryman/followers\",\"following_url\":\"https://api.github.com/users/Ryman/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/Ryman/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/Ryman/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/Ryman/subscriptions\",\"organizations_url\":\"https://api.github.com/users/Ryman/orgs\",\"repos_url\":\"https://api.github.com/users/Ryman/repos\",\"events_url\":\"https://api.github.com/users/Ryman/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/Ryman/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2018-05-08T10:16:56Z\",\"updated_at\":\"2018-05-08T10:16:56Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"It looks like the rest of the Search API is supported but the `search/issues` endpoint isn't, it would be great to have that support :) \",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/119\",\"id\":234972213,\"node_id\":\"MDU6SXNzdWUyMzQ5NzIyMTM=\",\"number\":119,\"title\":\"Support for v4 GraphQL\",\"user\":{\"login\":\"mgwidmann\",\"id\":5035724,\"node_id\":\"MDQ6VXNlcjUwMzU3MjQ=\",\"avatar_url\":\"https://avatars1.githubusercontent.com/u/5035724?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mgwidmann\",\"html_url\":\"https://github.com/mgwidmann\",\"followers_url\":\"https://api.github.com/users/mgwidmann/followers\",\"following_url\":\"https://api.github.com/users/mgwidmann/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mgwidmann/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mgwidmann/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mgwidmann/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mgwidmann/orgs\",\"repos_url\":\"https://api.github.com/users/mgwidmann/repos\",\"events_url\":\"https://api.github.com/users/mgwidmann/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mgwidmann/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-06-10T01:58:51Z\",\"updated_at\":\"2017-06-10T01:58:51Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Could be just basic but it'd be nice to be able to easily specify the query and the parameters w/ the client and have it run it for you. Something like:\\r\\n\\r\\n```elixir\\r\\nTentacat.GraphQL.query(@query, %{params: :go_here}, client)\\r\\n```\",\"score\":1.0}]}", + "body": "{\"total_count\":16,\"incomplete_results\":false,\"items\":[{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/84/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/84\",\"id\":154776454,\"node_id\":\"MDU6SXNzdWUxNTQ3NzY0NTQ=\",\"number\":84,\"title\":\"Github rate limit\",\"user\":{\"login\":\"mgwidmann\",\"id\":5035724,\"node_id\":\"MDQ6VXNlcjUwMzU3MjQ=\",\"avatar_url\":\"https://avatars1.githubusercontent.com/u/5035724?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mgwidmann\",\"html_url\":\"https://github.com/mgwidmann\",\"followers_url\":\"https://api.github.com/users/mgwidmann/followers\",\"following_url\":\"https://api.github.com/users/mgwidmann/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mgwidmann/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mgwidmann/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mgwidmann/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mgwidmann/orgs\",\"repos_url\":\"https://api.github.com/users/mgwidmann/repos\",\"events_url\":\"https://api.github.com/users/mgwidmann/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mgwidmann/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":12,\"created_at\":\"2016-05-13T18:45:41Z\",\"updated_at\":\"2017-11-28T22:48:07Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Currently theres no handling of the rate limit in this project. I regularly hit the rate limit (usually at the end of the hour) and would like to hear your thoughts on how to handle this properly.\\n\\nHeres the exception I get when that happens:\\n\\n```\\n[error] Task #PID<0.516.0> started from #PID<0.515.0> terminating\\n** (FunctionClauseError) no function clause matching in Tentacat.process_stream/1\\n lib/tentacat.ex:102: Tentacat.process_stream({403, %{\\\"documentation_url\\\" => \\\"https://developer.github.com/v3/#rate-limiting\\\", \\\"message\\\" => \\\"API rate limit exceeded for mgwidmann.\\\"}})\\n (elixir) lib/stream.ex:1099: Stream.do_resource/5\\n (elixir) lib/enum.ex:1486: Enum.reduce/3\\n (elixir) lib/enum.ex:2248: Enum.to_list/1\\n```\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/95/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/95\",\"id\":176103956,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0ODQ3MTUxNDE=\",\"number\":95,\"title\":\"readme\",\"user\":{\"login\":\"polymetis\",\"id\":1136430,\"node_id\":\"MDQ6VXNlcjExMzY0MzA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/1136430?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/polymetis\",\"html_url\":\"https://github.com/polymetis\",\"followers_url\":\"https://api.github.com/users/polymetis/followers\",\"following_url\":\"https://api.github.com/users/polymetis/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/polymetis/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/polymetis/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/polymetis/subscriptions\",\"organizations_url\":\"https://api.github.com/users/polymetis/orgs\",\"repos_url\":\"https://api.github.com/users/polymetis/repos\",\"events_url\":\"https://api.github.com/users/polymetis/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/polymetis/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2016-09-09T20:37:31Z\",\"updated_at\":\"2016-09-11T22:34:55Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/95\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/95\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/95.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/95.patch\"},\"body\":\"Just added a readme function because I was floating about the code. \\n\\nhttps://developer.github.com/v3/repos/contents/#get-the-readme\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/72/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/72\",\"id\":147169427,\"node_id\":\"MDU6SXNzdWUxNDcxNjk0Mjc=\",\"number\":72,\"title\":\"Documentation doesn't mention you can pass parameters\",\"user\":{\"login\":\"2016rshah\",\"id\":6821244,\"node_id\":\"MDQ6VXNlcjY4MjEyNDQ=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/6821244?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/2016rshah\",\"html_url\":\"https://github.com/2016rshah\",\"followers_url\":\"https://api.github.com/users/2016rshah/followers\",\"following_url\":\"https://api.github.com/users/2016rshah/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/2016rshah/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/2016rshah/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/2016rshah/subscriptions\",\"organizations_url\":\"https://api.github.com/users/2016rshah/orgs\",\"repos_url\":\"https://api.github.com/users/2016rshah/repos\",\"events_url\":\"https://api.github.com/users/2016rshah/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/2016rshah/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2016-04-09T22:26:22Z\",\"updated_at\":\"2016-04-10T21:52:51Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"As you can see [here](https://github.com/edgurgel/tentacat/blob/master/lib/tentacat/repositories.ex#L25) the documentation doesn't mention you can pass in parameters like `[sort: \\\"pushed\\\"]` to the function even though that feature has already been implemented. \\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/78/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/78\",\"id\":151130683,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0Njc4ODI3MzQ=\",\"number\":78,\"title\":\"edit issues by https://developer.github.com/v3/issues/#edit-an-issue\",\"user\":{\"login\":\"zhongwencool\",\"id\":3116225,\"node_id\":\"MDQ6VXNlcjMxMTYyMjU=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/3116225?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/zhongwencool\",\"html_url\":\"https://github.com/zhongwencool\",\"followers_url\":\"https://api.github.com/users/zhongwencool/followers\",\"following_url\":\"https://api.github.com/users/zhongwencool/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/zhongwencool/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/zhongwencool/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/zhongwencool/subscriptions\",\"organizations_url\":\"https://api.github.com/users/zhongwencool/orgs\",\"repos_url\":\"https://api.github.com/users/zhongwencool/repos\",\"events_url\":\"https://api.github.com/users/zhongwencool/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/zhongwencool/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":2,\"created_at\":\"2016-04-26T13:11:06Z\",\"updated_at\":\"2016-04-26T16:33:53Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/78\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/78\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/78.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/78.patch\"},\"body\":\"\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/111/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/111\",\"id\":208578174,\"node_id\":\"MDExOlB1bGxSZXF1ZXN0MTA2ODI2Nzk2\",\"number\":111,\"title\":\"Add support for notifications API\",\"user\":{\"login\":\"Baransu\",\"id\":9558691,\"node_id\":\"MDQ6VXNlcjk1NTg2OTE=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/9558691?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/Baransu\",\"html_url\":\"https://github.com/Baransu\",\"followers_url\":\"https://api.github.com/users/Baransu/followers\",\"following_url\":\"https://api.github.com/users/Baransu/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/Baransu/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/Baransu/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/Baransu/subscriptions\",\"organizations_url\":\"https://api.github.com/users/Baransu/orgs\",\"repos_url\":\"https://api.github.com/users/Baransu/repos\",\"events_url\":\"https://api.github.com/users/Baransu/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/Baransu/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":3,\"created_at\":\"2017-02-17T22:46:20Z\",\"updated_at\":\"2017-03-26T11:52:46Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"pull_request\":{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/pulls/111\",\"html_url\":\"https://github.com/edgurgel/tentacat/pull/111\",\"diff_url\":\"https://github.com/edgurgel/tentacat/pull/111.diff\",\"patch_url\":\"https://github.com/edgurgel/tentacat/pull/111.patch\"},\"body\":\"I found that notifications is not covered in this library so I've added functions cover this part of API.\\r\\n\\r\\nI've also tried to add tests to every new function but in seems that token yourtokencomeshere\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/96/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/96\",\"id\":176381918,\"node_id\":\"MDU6SXNzdWUxNzYzODE5MTg=\",\"number\":96,\"title\":\"Support for .diff and .patch mediatypes\",\"user\":{\"login\":\"smetana\",\"id\":5590,\"node_id\":\"MDQ6VXNlcjU1OTA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/5590?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/smetana\",\"html_url\":\"https://github.com/smetana\",\"followers_url\":\"https://api.github.com/users/smetana/followers\",\"following_url\":\"https://api.github.com/users/smetana/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/smetana/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/smetana/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/smetana/subscriptions\",\"organizations_url\":\"https://api.github.com/users/smetana/orgs\",\"repos_url\":\"https://api.github.com/users/smetana/repos\",\"events_url\":\"https://api.github.com/users/smetana/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/smetana/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":2,\"created_at\":\"2016-09-12T13:57:03Z\",\"updated_at\":\"2017-02-16T11:31:43Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"GitHub API allows to set Accept header to application/vnd.github.v3.diff and application/vnd.github.v3.patch to return raw diffs and patches. This raises error in Tentacat because response body is always processed by Jason.decode!. Even if it is not json\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/2/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/2\",\"id\":15853488,\"node_id\":\"MDU6SXNzdWUxNTg1MzQ4OA==\",\"number\":2,\"title\":\"Tentacat Logo/Mascott\",\"user\":{\"login\":\"edgurgel\",\"id\":30873,\"node_id\":\"MDQ6VXNlcjMwODcz\",\"avatar_url\":\"https://avatars0.githubusercontent.com/u/30873?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/edgurgel\",\"html_url\":\"https://github.com/edgurgel\",\"followers_url\":\"https://api.github.com/users/edgurgel/followers\",\"following_url\":\"https://api.github.com/users/edgurgel/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/edgurgel/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/edgurgel/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/edgurgel/subscriptions\",\"organizations_url\":\"https://api.github.com/users/edgurgel/orgs\",\"repos_url\":\"https://api.github.com/users/edgurgel/repos\",\"events_url\":\"https://api.github.com/users/edgurgel/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/edgurgel/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[{\"id\":43408683,\"node_id\":\"MDU6TGFiZWw0MzQwODY4Mw==\",\"url\":\"https://api.github.com/repos/edgurgel/tentacat/labels/enhancement\",\"name\":\"enhancement\",\"color\":\"84b6eb\",\"default\":true}],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2013-06-21T14:25:06Z\",\"updated_at\":\"2015-12-14T20:51:31Z\",\"closed_at\":null,\"author_association\":\"OWNER\",\"body\":\"We need a cool logo/mascott for Tentacat! @jugoncalves :question: \\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/135/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/135\",\"id\":277541753,\"node_id\":\"MDU6SXNzdWUyNzc1NDE3NTM=\",\"number\":135,\"title\":\"passing the etag in requests\",\"user\":{\"login\":\"bryanhuntesl\",\"id\":31992054,\"node_id\":\"MDQ6VXNlcjMxOTkyMDU0\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/31992054?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/bryanhuntesl\",\"html_url\":\"https://github.com/bryanhuntesl\",\"followers_url\":\"https://api.github.com/users/bryanhuntesl/followers\",\"following_url\":\"https://api.github.com/users/bryanhuntesl/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/bryanhuntesl/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/bryanhuntesl/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/bryanhuntesl/subscriptions\",\"organizations_url\":\"https://api.github.com/users/bryanhuntesl/orgs\",\"repos_url\":\"https://api.github.com/users/bryanhuntesl/repos\",\"events_url\":\"https://api.github.com/users/bryanhuntesl/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/bryanhuntesl/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2017-11-28T21:19:51Z\",\"updated_at\":\"2017-11-28T21:21:51Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Hi, I'm going to drop down to HTTPoison most likely for this, one optimization which can be made in any call is to pass the ETag from the previous invocation - if you do so, and nothing has changed, your rate limit remains unchanged. Could it be passed in the existing options block? \\r\\n\\r\\n\\\"ETag\\\", \\\"\\\\\\\"eaa46eb91c77ded86b4261245e49fbd5\\\\\\\"\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/144/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/144\",\"id\":315491184,\"node_id\":\"MDU6SXNzdWUzMTU0OTExODQ=\",\"number\":144,\"title\":\"0.9.0 API is inconsistent. Some requests still return body instead of tuple {code, body, response}\",\"user\":{\"login\":\"smetana\",\"id\":5590,\"node_id\":\"MDQ6VXNlcjU1OTA=\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/5590?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/smetana\",\"html_url\":\"https://github.com/smetana\",\"followers_url\":\"https://api.github.com/users/smetana/followers\",\"following_url\":\"https://api.github.com/users/smetana/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/smetana/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/smetana/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/smetana/subscriptions\",\"organizations_url\":\"https://api.github.com/users/smetana/orgs\",\"repos_url\":\"https://api.github.com/users/smetana/repos\",\"events_url\":\"https://api.github.com/users/smetana/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/smetana/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[{\"id\":43408681,\"node_id\":\"MDU6TGFiZWw0MzQwODY4MQ==\",\"url\":\"https://api.github.com/repos/edgurgel/tentacat/labels/bug\",\"name\":\"bug\",\"color\":\"fc2929\",\"default\":true}],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":1,\"created_at\":\"2018-04-18T13:56:30Z\",\"updated_at\":\"2018-04-18T22:49:30Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"```elixir\\r\\nTentacat.Organizations.list_mine(client) # returns tuple\\r\\nTentacat.Repositories.list_mine(client) # returns list\\r\\n```\\r\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/93/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/93\",\"id\":173455290,\"node_id\":\"MDU6SXNzdWUxNzM0NTUyOTA=\",\"number\":93,\"title\":\"support passing in params for Deployments.list method\",\"user\":{\"login\":\"batmany13\",\"id\":2660308,\"node_id\":\"MDQ6VXNlcjI2NjAzMDg=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/2660308?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/batmany13\",\"html_url\":\"https://github.com/batmany13\",\"followers_url\":\"https://api.github.com/users/batmany13/followers\",\"following_url\":\"https://api.github.com/users/batmany13/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/batmany13/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/batmany13/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/batmany13/subscriptions\",\"organizations_url\":\"https://api.github.com/users/batmany13/orgs\",\"repos_url\":\"https://api.github.com/users/batmany13/repos\",\"events_url\":\"https://api.github.com/users/batmany13/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/batmany13/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2016-08-26T13:39:16Z\",\"updated_at\":\"2016-12-18T23:16:24Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"Looking at GitHub's Deployments api [docs](https://developer.github.com/v3/repos/deployments/#create-a-deployment), it describes the ability to filter deployments by \\\"sha\\\", \\\"ref\\\", \\\"task\\\" and \\\"environment\\\". There doesn't seem to be the ability to pass in optional query params to the Tentacat.Repositories.Deployments.list call. This will be convenient, for instance, in the case of finding all deployments associated with a PR/sha value.\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/101/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/101\",\"id\":187885766,\"node_id\":\"MDU6SXNzdWUxODc4ODU3NjY=\",\"number\":101,\"title\":\"Add headers for text match?\",\"user\":{\"login\":\"mercul3s\",\"id\":2100610,\"node_id\":\"MDQ6VXNlcjIxMDA2MTA=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/2100610?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mercul3s\",\"html_url\":\"https://github.com/mercul3s\",\"followers_url\":\"https://api.github.com/users/mercul3s/followers\",\"following_url\":\"https://api.github.com/users/mercul3s/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mercul3s/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mercul3s/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mercul3s/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mercul3s/orgs\",\"repos_url\":\"https://api.github.com/users/mercul3s/repos\",\"events_url\":\"https://api.github.com/users/mercul3s/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mercul3s/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2016-11-08T02:28:57Z\",\"updated_at\":\"2016-11-08T02:28:57Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"I'm trying to use Github's metadata matching to return code snippets/highlights in the response, as documented in https://developer.github.com/v3/search/#text-match-metadata. I know that I can add my own headers in HTTPoison, ie\\r\\n```\\r\\nheader_list = Enum.to_list(headers)\\r\\n [{\\\"Accept\\\", \\\"application/vnd.github.v3.text-match+json\\\"} | header_list]\\r\\n```\\r\\nSo I can get back something like this:\\r\\n```\\r\\n...\\r\\n \\\"object_type\\\": \\\"FileContent\\\",\\r\\n \\\"property\\\": \\\"content\\\",\\r\\n \\\"fragment\\\": \\\"\\\\\\\",\\\\n \\\\\\\"key_limit\\\\\\\": 2,\\\\n \\\\\\\"owner\\\\\\\": {\\\\n \\\\\\\"email\\\",\\r\\n \\\"matches\\\": [\\r\\n {\\r\\n \\\"text\\\": \\\"key_limit\\\",\\r\\n \\\"indices\\\": [\\r\\n 16,\\r\\n 25\\r\\n ]\\r\\n\\t}\\r\\n...\\r\\n```\\r\\nIs there a way to pass the header info during the client creation? I tried something like the following, but no luck:\\r\\n```\\r\\nTentacat.Client.new(%{access_token: \\\"#{token}\\\", accept: \\\"application/vnd.github.v3.text-match+json\\\"}, \\\"#{@uri}\\\")\\r\\n```\\r\\nI also tried wrapping HTTPoison.base to pass the accept header, but I'm assuming that'll only work if I'm using all the HTTPoison base methods directly. Attempts to add text match as a header return results as a regular search api call. Any suggestions?\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/112/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/112\",\"id\":218698734,\"node_id\":\"MDU6SXNzdWUyMTg2OTg3MzQ=\",\"number\":112,\"title\":\"Projects support\",\"user\":{\"login\":\"AndrewDryga\",\"id\":1877644,\"node_id\":\"MDQ6VXNlcjE4Nzc2NDQ=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/1877644?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/AndrewDryga\",\"html_url\":\"https://github.com/AndrewDryga\",\"followers_url\":\"https://api.github.com/users/AndrewDryga/followers\",\"following_url\":\"https://api.github.com/users/AndrewDryga/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/AndrewDryga/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/AndrewDryga/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/AndrewDryga/subscriptions\",\"organizations_url\":\"https://api.github.com/users/AndrewDryga/orgs\",\"repos_url\":\"https://api.github.com/users/AndrewDryga/repos\",\"events_url\":\"https://api.github.com/users/AndrewDryga/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/AndrewDryga/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-04-01T14:20:19Z\",\"updated_at\":\"2017-04-01T14:20:19Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"It will be really nice to have one library that helps to automate Github Projects workflow (eg list labels and set correct workflow status in GitHub Projects).\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/128/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/128\",\"id\":271303127,\"node_id\":\"MDU6SXNzdWUyNzEzMDMxMjc=\",\"number\":128,\"title\":\"Feature request: Add Gist endpoint\",\"user\":{\"login\":\"DoumanAsh\",\"id\":5676053,\"node_id\":\"MDQ6VXNlcjU2NzYwNTM=\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/5676053?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/DoumanAsh\",\"html_url\":\"https://github.com/DoumanAsh\",\"followers_url\":\"https://api.github.com/users/DoumanAsh/followers\",\"following_url\":\"https://api.github.com/users/DoumanAsh/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/DoumanAsh/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/DoumanAsh/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/DoumanAsh/subscriptions\",\"organizations_url\":\"https://api.github.com/users/DoumanAsh/orgs\",\"repos_url\":\"https://api.github.com/users/DoumanAsh/repos\",\"events_url\":\"https://api.github.com/users/DoumanAsh/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/DoumanAsh/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-11-05T18:40:12Z\",\"updated_at\":\"2017-11-05T18:40:12Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"Subj.\\r\\nReference https://developer.github.com/v3/gists/\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/141/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/141\",\"id\":302131791,\"node_id\":\"MDU6SXNzdWUzMDIxMzE3OTE=\",\"number\":141,\"title\":\"Feature request toggle 'watching' \",\"user\":{\"login\":\"bryanhuntesl\",\"id\":31992054,\"node_id\":\"MDQ6VXNlcjMxOTkyMDU0\",\"avatar_url\":\"https://avatars3.githubusercontent.com/u/31992054?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/bryanhuntesl\",\"html_url\":\"https://github.com/bryanhuntesl\",\"followers_url\":\"https://api.github.com/users/bryanhuntesl/followers\",\"following_url\":\"https://api.github.com/users/bryanhuntesl/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/bryanhuntesl/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/bryanhuntesl/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/bryanhuntesl/subscriptions\",\"organizations_url\":\"https://api.github.com/users/bryanhuntesl/orgs\",\"repos_url\":\"https://api.github.com/users/bryanhuntesl/repos\",\"events_url\":\"https://api.github.com/users/bryanhuntesl/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/bryanhuntesl/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2018-03-04T22:59:41Z\",\"updated_at\":\"2018-03-04T22:59:41Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"I've just implemented this in the python github client - this issue serves as a reminder to me, or anyone else who fancies a crack at it - to add this functionality to tentacat. \\r\\n\\r\\n## Subscribing to every public basho project on github\\r\\n\\r\\n[Link](https://github.com/PyGithub/PyGithub) to PyGithub/PyGithub project page \\r\\n\\r\\n[Commit](https://github.com/bryanhuntesl/PyGithub/commit/0d1104c9f7e5124db17dc186b350b1abb9dad270) which added and tested this functionality.\\r\\n\\r\\nInstall the feature version :\\r\\n\\r\\n```bash\\r\\npip install git+git://github.com/bryanhuntesl/PyGithub.git@esl-local-fix-watches \\r\\n```\\r\\n\\r\\nGrab a github token, set it as an environmental variable and run this snippet:\\r\\n\\r\\n```python\\r\\nfrom github import *\\r\\nimport os\\r\\ng = Github(login_or_token=os.getenv(\\\"GITHUB_TOKEN\\\"))\\r\\nu=g.get_user()\\r\\norg=g.get_organization(\\\"basho\\\")\\r\\nfor r in org.get_repos():\\r\\n u.add_to_watched(r)\\r\\n```\\r\\n\\r\\n### TADA \\r\\n\\r\\nNow you're subscribed to every currently public basho repository on github\\r\\n\\r\\n### Next \\r\\n\\r\\nPerform this same operation using [tentacat](https://github.com/edgurgel/tentacat).\\r\\n\\r\\n\",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/147/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/147\",\"id\":321125918,\"node_id\":\"MDU6SXNzdWUzMjExMjU5MTg=\",\"number\":147,\"title\":\"Add search/issues endpoint\",\"user\":{\"login\":\"Ryman\",\"id\":994978,\"node_id\":\"MDQ6VXNlcjk5NDk3OA==\",\"avatar_url\":\"https://avatars2.githubusercontent.com/u/994978?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/Ryman\",\"html_url\":\"https://github.com/Ryman\",\"followers_url\":\"https://api.github.com/users/Ryman/followers\",\"following_url\":\"https://api.github.com/users/Ryman/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/Ryman/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/Ryman/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/Ryman/subscriptions\",\"organizations_url\":\"https://api.github.com/users/Ryman/orgs\",\"repos_url\":\"https://api.github.com/users/Ryman/repos\",\"events_url\":\"https://api.github.com/users/Ryman/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/Ryman/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2018-05-08T10:16:56Z\",\"updated_at\":\"2018-05-08T10:16:56Z\",\"closed_at\":null,\"author_association\":\"NONE\",\"body\":\"It looks like the rest of the Search API is supported but the `search/issues` endpoint isn't, it would be great to have that support :) \",\"score\":1.0},{\"url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119\",\"repository_url\":\"https://api.github.com/repos/edgurgel/tentacat\",\"labels_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/labels{/name}\",\"comments_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/comments\",\"events_url\":\"https://api.github.com/repos/edgurgel/tentacat/issues/119/events\",\"html_url\":\"https://github.com/edgurgel/tentacat/issues/119\",\"id\":234972213,\"node_id\":\"MDU6SXNzdWUyMzQ5NzIyMTM=\",\"number\":119,\"title\":\"Support for v4 GraphQL\",\"user\":{\"login\":\"mgwidmann\",\"id\":5035724,\"node_id\":\"MDQ6VXNlcjUwMzU3MjQ=\",\"avatar_url\":\"https://avatars1.githubusercontent.com/u/5035724?v=4\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/mgwidmann\",\"html_url\":\"https://github.com/mgwidmann\",\"followers_url\":\"https://api.github.com/users/mgwidmann/followers\",\"following_url\":\"https://api.github.com/users/mgwidmann/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/mgwidmann/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/mgwidmann/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/mgwidmann/subscriptions\",\"organizations_url\":\"https://api.github.com/users/mgwidmann/orgs\",\"repos_url\":\"https://api.github.com/users/mgwidmann/repos\",\"events_url\":\"https://api.github.com/users/mgwidmann/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/mgwidmann/received_events\",\"type\":\"User\",\"site_admin\":false},\"labels\":[],\"state\":\"open\",\"locked\":false,\"assignee\":null,\"assignees\":[],\"milestone\":null,\"comments\":0,\"created_at\":\"2017-06-10T01:58:51Z\",\"updated_at\":\"2017-06-10T01:58:51Z\",\"closed_at\":null,\"author_association\":\"CONTRIBUTOR\",\"body\":\"Could be just basic but it'd be nice to be able to easily specify the query and the parameters w/ the client and have it run it for you. Something like:\\r\\n\\r\\n```elixir\\r\\nTentacat.GraphQL.query(@query, %{params: :go_here}, client)\\r\\n```\",\"score\":1.0}]}", "headers": { "Server": "GitHub.com", "Date": "Tue, 05 Jun 2018 10:41:07 GMT", @@ -39,4 +39,4 @@ "type": "ok" } } -] \ No newline at end of file +]